AubMemDump refactor

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2021-03-19 13:43:50 +01:00
committed by Compute-Runtime-Automation
parent c29a301959
commit 330ee3d227
41 changed files with 118 additions and 90 deletions

View File

@ -881,6 +881,7 @@ endif()
# Please keep alphabetical order
include_directories(${NEO_BUILD_DIR})
include_directories(${NEO_SOURCE_DIR})
include_directories(${NEO_SHARED_DIRECTORY}/aub_mem_dump/definitions${BRANCH_DIR_SUFFIX})
include_directories(${NEO_SHARED_DIRECTORY}/built_ins/builtinops${BRANCH_DIR_SUFFIX})
include_directories(${NEO_SHARED_DIRECTORY}/command_stream/definitions${BRANCH_DIR_SUFFIX})
include_directories(${NEO_SHARED_DIRECTORY}/compiler_interface/compiler_options${BRANCH_DIR_SUFFIX})

View File

@ -1,14 +1,15 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/helpers/common_types.h"
#include "aub_mem_dump.h"
#include <string>
namespace NEO {

View File

@ -1,14 +1,15 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/helpers/common_types.h"
#include "aub_mem_dump.h"
namespace NEO {
class CommandStreamReceiver;
class TbxSockets;

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen11/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen11/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen11/hw_cmds_lkf.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen12lp/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/gen12lp/hw_cmds_dg1.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen12lp/hw_cmds_rkl.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen12lp/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,10 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/gen12lp/hw_cmds.h"
#include "shared/source/helpers/array_count.h"
#include "shared/source/helpers/populate_factory.h"
@ -15,6 +14,8 @@
#include "opencl/source/command_stream/tbx_command_stream_receiver_hw.h"
#include "opencl/source/command_stream/tbx_command_stream_receiver_hw.inl"
#include "aub_mem_dump.h"
namespace NEO {
typedef TGLLPFamily Family;
static auto gfxCore = IGFX_GEN12LP_CORE;

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen8/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen9/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen9/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen9/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen9/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
#include "shared/source/gen9/hw_cmds.h"
#include "shared/source/helpers/constants.h"

View File

@ -7,10 +7,10 @@
#include "opencl/source/helpers/hardware_context_controller.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/os_interface/os_context.h"
#include "aub_mem_dump.h"
#include "third_party/aub_stream/headers/allocation_params.h"
using namespace NEO;

View File

@ -1,12 +1,10 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_services.h"
#include "opencl/extensions/public/cl_ext_private.h"
#include "opencl/test/unit_test/api/cl_api_tests.h"
#include "opencl/test/unit_test/mocks/mock_csr.h"

View File

@ -6,7 +6,6 @@
*/
#include "shared/source/aub/aub_helper.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/hw_helper.h"
@ -17,6 +16,7 @@
#include "opencl/test/unit_test/mocks/mock_lrca_helper.h"
#include "test.h"
#include "aub_mem_dump.h"
#include "gtest/gtest.h"
using namespace NEO;

View File

@ -1,14 +1,14 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "test.h"
#include "aub_mem_dump.h"
#include <memory>
using namespace AubMemDump;

View File

@ -1,12 +1,11 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/memory_manager/internal_allocation_storage.h"
#include "shared/source/memory_manager/memory_banks.h"
@ -19,6 +18,7 @@
#include "opencl/test/unit_test/command_stream/command_stream_fixture.h"
#include "opencl/test/unit_test/mocks/mock_allocation_properties.h"
#include "aub_mem_dump.h"
#include "gtest/gtest.h"
#include <cstdint>

View File

@ -6,7 +6,6 @@
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/device/device.h"
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/helpers/ptr_math.h"
@ -15,6 +14,7 @@
#include "test.h"
#include "aub_mapper.h"
#include "aub_mem_dump.h"
namespace Os {
extern const char *fileSeparator;

View File

@ -6,7 +6,6 @@
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/os_interface/os_interface.h"
@ -22,6 +21,7 @@
#include "opencl/test/unit_test/mocks/mock_memory_operations_handler.h"
#include "opencl/test/unit_test/mocks/mock_platform.h"
#include "aub_mem_dump.h"
#include "gtest/gtest.h"
#include <sstream>

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -8,7 +8,8 @@
#pragma once
#include "shared/source/aub/aub_mapper_base.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "aub_mem_dump.h"
namespace NEO {

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -7,7 +7,7 @@
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "aub_mem_dump.h"
struct MockLrcaHelper : AubMemDump::LrcaHelper {
mutable uint32_t setContextSaveRestoreFlagsCalled = 0;

View File

@ -7,10 +7,10 @@
#include "shared/source/aub/aub_helper.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/basic_math.h"
#include "aub_mem_dump.h"
#include "third_party/aub_stream/headers/aubstream.h"
namespace NEO {

View File

@ -1,12 +1,13 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub/aub_helper.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "aub_mem_dump.h"
namespace NEO {

View File

@ -1,14 +1,15 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/helpers/completion_stamp.h"
#include "aub_mem_dump.h"
#include <vector>
namespace NEO {

View File

@ -1,12 +1,12 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "aub_mem_dump.h"
#include <string>

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2019-2020 Intel Corporation
# Copyright (C) 2019-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
@ -11,9 +11,7 @@ set(NEO_CORE_AUB_MEM_DUMP
${CMAKE_CURRENT_SOURCE_DIR}/aub_data.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_header.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump.cpp
${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump.inl
${CMAKE_CURRENT_SOURCE_DIR}/aub_services.h
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/context_flags.cpp
${CMAKE_CURRENT_SOURCE_DIR}/page_table_entry_bits.h
)

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -7,11 +7,12 @@
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/gmm_helper/resource_info.h"
#include "shared/source/memory_manager/graphics_allocation.h"
#include "aub_mem_dump.h"
using namespace NEO;
namespace aub_stream {

View File

@ -1,28 +1,10 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstdint>
#include <cstdio>
#include <fstream>
#include <mutex>
#include <string>
#ifndef BIT
#define BIT(x) (((uint64_t)1) << (x))
#endif
#include "shared/source/aub_mem_dump/aub_data.h"
namespace NEO {
class AubHelper;
}
namespace AubMemDump {
#include "aub_services.h"
constexpr uint32_t rcsRegisterBase = 0x2000;
@ -402,4 +384,3 @@ struct LrcaHelperCcs : public LrcaHelper {
extern const uint64_t g_pageMask;
extern const size_t g_dwordCountMax;
} // namespace AubMemDump

View File

@ -1,11 +1,11 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "aub_mem_dump.h"
namespace AubMemDump {
void LrcaHelper::setContextSaveRestoreFlags(uint32_t &ctxSrCtlValue) const {

View File

@ -0,0 +1,16 @@
#
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
get_property(NEO_CORE_AUB_MEM_DUMP GLOBAL PROPERTY NEO_CORE_AUB_MEM_DUMP)
list(APPEND NEO_CORE_AUB_MEM_DUMP
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/aub_mem_dump.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_services.h
)
set_property(GLOBAL PROPERTY NEO_CORE_AUB_MEM_DUMP ${NEO_CORE_AUB_MEM_DUMP})
add_subdirectories()

View File

@ -0,0 +1,27 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstdint>
#include <cstdio>
#include <fstream>
#include <mutex>
#include <string>
#ifndef BIT
#define BIT(x) (((uint64_t)1) << (x))
#endif
#include "shared/source/aub_mem_dump/aub_data.h"
namespace NEO {
class AubHelper;
}
namespace AubMemDump {
#include "shared/source/aub_mem_dump/aub_mem_dump_base.inl"
} // namespace AubMemDump

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2020 Intel Corporation
* Copyright (C) 2017-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -7,7 +7,7 @@
#pragma once
#include "aub_header.h"
#include "shared/source/aub_mem_dump/aub_header.h"
#include <cstdint>
@ -97,11 +97,11 @@ struct CmdServicesMemTraceVersion {
Kbl = 16,
Bdw = 11,
Icllp = 19,
Tgllp = 22,
Cfl = 24,
Lkf = 25,
Ehl = 28,
Dg1 = 30,
Tgllp = 22,
Adls = 37
};
};

View File

@ -6,7 +6,6 @@
*/
#pragma once
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/built_ins/sip.h"
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/command_stream/linear_stream.h"
@ -15,6 +14,7 @@
#include "shared/source/helpers/engine_node_helper.h"
#include "shared/source/utilities/stackvec.h"
#include "aub_mem_dump.h"
#include "engine_group_types.h"
#include "hw_cmds.h"
#include "third_party/aub_stream/headers/aubstream.h"

View File

@ -5,7 +5,6 @@
*
*/
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/gmm_helper/gmm_helper.h"
@ -19,6 +18,7 @@
#include "shared/source/memory_manager/graphics_allocation.h"
#include "shared/source/os_interface/os_interface.h"
#include "aub_mem_dump.h"
#include "pipe_control_args.h"
namespace NEO {

View File

@ -7,10 +7,10 @@
#include "shared/source/os_interface/aub_memory_operations_handler.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/memory_manager/graphics_allocation.h"
#include "aub_mem_dump.h"
#include "third_party/aub_stream/headers/allocation_params.h"
#include <algorithm>

View File

@ -7,11 +7,11 @@
#include "shared/test/unit_test/os_interface/aub_memory_operations_handler_tests.h"
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
#include "opencl/test/unit_test/mocks/mock_aub_manager.h"
#include "opencl/test/unit_test/mocks/mock_gmm.h"
#include "aub_mem_dump.h"
TEST_F(AubMemoryOperationsHandlerTests, givenNullPtrAsAubManagerWhenMakeResidentCalledThenFalseReturned) {
getMemoryOperationsHandler()->setAubManager(nullptr);
auto memoryOperationsInterface = getMemoryOperationsHandler();