mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Move DebuggerL0 to shared
Related-To: NEO-7075 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
60b88806d5
commit
673bf3b553
@@ -237,6 +237,7 @@ if(BUILD_WITH_L0)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_sources(${TARGET_NAME_L0}
|
target_sources(${TARGET_NAME_L0}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
${NEO_SHARED_DIRECTORY}/dll/windows/debugger_l0_windows.cpp
|
||||||
${NEO_SHARED_DIRECTORY}/dll/windows/environment_variables.cpp
|
${NEO_SHARED_DIRECTORY}/dll/windows/environment_variables.cpp
|
||||||
${NEO_SHARED_DIRECTORY}/dll/windows/options_windows.cpp
|
${NEO_SHARED_DIRECTORY}/dll/windows/options_windows.cpp
|
||||||
${NEO_SHARED_DIRECTORY}/dll/windows/os_interface.cpp
|
${NEO_SHARED_DIRECTORY}/dll/windows/os_interface.cpp
|
||||||
@@ -262,6 +263,7 @@ if(BUILD_WITH_L0)
|
|||||||
${NEO_SHARED_DIRECTORY}/dll/devices${BRANCH_DIR_SUFFIX}devices.inl
|
${NEO_SHARED_DIRECTORY}/dll/devices${BRANCH_DIR_SUFFIX}devices.inl
|
||||||
${NEO_SHARED_DIRECTORY}/dll/devices${BRANCH_DIR_SUFFIX}devices_additional.inl
|
${NEO_SHARED_DIRECTORY}/dll/devices${BRANCH_DIR_SUFFIX}devices_additional.inl
|
||||||
${NEO_SHARED_DIRECTORY}/dll/devices/devices_base.inl
|
${NEO_SHARED_DIRECTORY}/dll/devices/devices_base.inl
|
||||||
|
${NEO_SHARED_DIRECTORY}/dll/linux/debugger_l0_dll_linux.cpp
|
||||||
${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp
|
${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp
|
||||||
${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.cpp
|
${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.cpp
|
||||||
${NEO_SHARED_DIRECTORY}/dll/linux/os_interface.cpp
|
${NEO_SHARED_DIRECTORY}/dll/linux/os_interface.cpp
|
||||||
@@ -374,7 +376,6 @@ if(BUILD_WITH_L0)
|
|||||||
L0_SOURCES_WINDOWS
|
L0_SOURCES_WINDOWS
|
||||||
L0_SRCS_CACHE_RESERVATION
|
L0_SRCS_CACHE_RESERVATION
|
||||||
L0_SRCS_COMPILER_INTERFACE
|
L0_SRCS_COMPILER_INTERFACE
|
||||||
L0_SRCS_DEBUGGER
|
|
||||||
L0_SRCS_DRIVER
|
L0_SRCS_DRIVER
|
||||||
L0_SRCS_OCLOC_SHARED
|
L0_SRCS_OCLOC_SHARED
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020-2022 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
#
|
|
||||||
|
|
||||||
set(L0_SRCS_DEBUGGER
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0.inl
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_base.inl
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_tgllp_and_later.inl
|
|
||||||
)
|
|
||||||
|
|
||||||
add_subdirectories()
|
|
||||||
set_property(GLOBAL PROPERTY L0_SRCS_DEBUGGER ${L0_SRCS_DEBUGGER})
|
|
||||||
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
|
|
||||||
#include <level_zero/ze_api.h>
|
#include <level_zero/ze_api.h>
|
||||||
#include <level_zero/zet_api.h>
|
#include <level_zero/zet_api.h>
|
||||||
|
|
||||||
@@ -115,10 +116,10 @@ struct Device : _ze_device_handle_t {
|
|||||||
virtual NEO::PreemptionMode getDevicePreemptionMode() const = 0;
|
virtual NEO::PreemptionMode getDevicePreemptionMode() const = 0;
|
||||||
virtual const NEO::DeviceInfo &getDeviceInfo() const = 0;
|
virtual const NEO::DeviceInfo &getDeviceInfo() const = 0;
|
||||||
NEO::SourceLevelDebugger *getSourceLevelDebugger() { return getNEODevice()->getSourceLevelDebugger(); }
|
NEO::SourceLevelDebugger *getSourceLevelDebugger() { return getNEODevice()->getSourceLevelDebugger(); }
|
||||||
DebuggerL0 *getL0Debugger() {
|
NEO::DebuggerL0 *getL0Debugger() {
|
||||||
auto debugger = getNEODevice()->getDebugger();
|
auto debugger = getNEODevice()->getDebugger();
|
||||||
if (debugger) {
|
if (debugger) {
|
||||||
return !debugger->isLegacy() ? static_cast<DebuggerL0 *>(debugger) : nullptr;
|
return !debugger->isLegacy() ? static_cast<NEO::DebuggerL0 *>(debugger) : nullptr;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
set(L0_SRCS_DLL_LINUX
|
set(L0_SRCS_DLL_LINUX
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_linux.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NEO_ENABLE_i915_PRELIM_DETECTION)
|
if(NEO_ENABLE_i915_PRELIM_DETECTION)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
set(L0_SRCS_DLL_WINDOWS
|
set(L0_SRCS_DLL_WINDOWS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_windows.cpp
|
|
||||||
${NEO_SOURCE_DIR}/level_zero/tools/source/debug/windows/debug_session_windows_helper.cpp
|
${NEO_SOURCE_DIR}/level_zero/tools/source/debug/windows/debug_session_windows_helper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
||||||
|
|
||||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/device/device.h"
|
#include "shared/source/device/device.h"
|
||||||
#include "shared/source/helpers/string.h"
|
#include "shared/source/helpers/string.h"
|
||||||
#include "shared/source/memory_manager/memory_manager.h"
|
#include "shared/source/memory_manager/memory_manager.h"
|
||||||
@@ -15,7 +16,6 @@
|
|||||||
#include "shared/source/os_interface/os_library.h"
|
#include "shared/source/os_interface/os_library.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/context/context_imp.h"
|
#include "level_zero/core/source/context/context_imp.h"
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
|
||||||
#include "level_zero/core/source/device/device_imp.h"
|
#include "level_zero/core/source/device/device_imp.h"
|
||||||
#include "level_zero/core/source/driver/driver_imp.h"
|
#include "level_zero/core/source/driver/driver_imp.h"
|
||||||
#include "level_zero/core/source/driver/host_pointer_manager.h"
|
#include "level_zero/core/source/driver/host_pointer_manager.h"
|
||||||
@@ -181,7 +181,7 @@ void DriverHandleImp::enableRootDeviceDebugger(std::unique_ptr<NEO::Device> &neo
|
|||||||
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedBuffers = false;
|
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedBuffers = false;
|
||||||
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedImages = false;
|
rootDeviceEnvironment->getMutableHardwareInfo()->capabilityTable.ftrRenderCompressedImages = false;
|
||||||
|
|
||||||
rootDeviceEnvironment->debugger = DebuggerL0::create(neoDevice.get());
|
rootDeviceEnvironment->debugger = NEO::DebuggerL0::create(neoDevice.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ if(SUPPORT_GEN11)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.h
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_gen11.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen11.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen11.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen11.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen11.cpp
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2020-2022 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.inl"
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0_base.inl"
|
|
||||||
|
|
||||||
namespace NEO {
|
|
||||||
struct ICLFamily;
|
|
||||||
using GfxFamily = ICLFamily;
|
|
||||||
} // namespace NEO
|
|
||||||
|
|
||||||
namespace L0 {
|
|
||||||
template class DebuggerL0Hw<NEO::GfxFamily>;
|
|
||||||
static DebuggerL0PopulateFactory<IGFX_GEN11_CORE, NEO::GfxFamily> debuggerGen11;
|
|
||||||
} // namespace L0
|
|
||||||
@@ -9,7 +9,6 @@ if(SUPPORT_GEN12LP)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen12lp.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen12lp.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen12lp.h
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen12lp.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_gen12lp.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions/cache_flush_gen12lp.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/definitions/cache_flush_gen12lp.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen12lp.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen12lp.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen12lp.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen12lp.cpp
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2020-2022 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.inl"
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0_tgllp_and_later.inl"
|
|
||||||
namespace L0 {
|
|
||||||
|
|
||||||
using Family = NEO::TGLLPFamily;
|
|
||||||
|
|
||||||
template class DebuggerL0Hw<Family>;
|
|
||||||
static DebuggerL0PopulateFactory<IGFX_GEN12LP_CORE, Family> debuggerGen12lp;
|
|
||||||
|
|
||||||
} // namespace L0
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
if(SUPPORT_GEN8)
|
if(SUPPORT_GEN8)
|
||||||
set(HW_SOURCES_GEN8
|
set(HW_SOURCES_GEN8
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_gen8.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen8.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen8.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2020-2022 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.inl"
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0_base.inl"
|
|
||||||
|
|
||||||
namespace NEO {
|
|
||||||
|
|
||||||
struct BDWFamily;
|
|
||||||
using GfxFamily = BDWFamily;
|
|
||||||
|
|
||||||
} // namespace NEO
|
|
||||||
|
|
||||||
namespace L0 {
|
|
||||||
template class DebuggerL0Hw<NEO::GfxFamily>;
|
|
||||||
} // namespace L0
|
|
||||||
@@ -9,7 +9,6 @@ if(SUPPORT_GEN9)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.h
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_gen9.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen9.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen9.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen9.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen9.cpp
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2020-2022 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.inl"
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0_base.inl"
|
|
||||||
|
|
||||||
namespace NEO {
|
|
||||||
struct SKLFamily;
|
|
||||||
using GfxFamily = SKLFamily;
|
|
||||||
} // namespace NEO
|
|
||||||
|
|
||||||
namespace L0 {
|
|
||||||
|
|
||||||
template class DebuggerL0Hw<NEO::GfxFamily>;
|
|
||||||
static DebuggerL0PopulateFactory<IGFX_GEN9_CORE, NEO::GfxFamily> debuggerGen9;
|
|
||||||
} // namespace L0
|
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "level_zero/core/source/kernel/kernel_imp.h"
|
#include "level_zero/core/source/kernel/kernel_imp.h"
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/helpers/basic_math.h"
|
#include "shared/source/helpers/basic_math.h"
|
||||||
#include "shared/source/helpers/blit_commands_helper.h"
|
#include "shared/source/helpers/blit_commands_helper.h"
|
||||||
#include "shared/source/helpers/hw_info.h"
|
#include "shared/source/helpers/hw_info.h"
|
||||||
@@ -26,7 +27,6 @@
|
|||||||
#include "shared/source/program/kernel_info.h"
|
#include "shared/source/program/kernel_info.h"
|
||||||
#include "shared/source/utilities/arrayref.h"
|
#include "shared/source/utilities/arrayref.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
|
||||||
#include "level_zero/core/source/device/device.h"
|
#include "level_zero/core/source/device/device.h"
|
||||||
#include "level_zero/core/source/device/device_imp.h"
|
#include "level_zero/core/source/device/device_imp.h"
|
||||||
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
#include "level_zero/core/source/driver/driver_handle_imp.h"
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ if(SUPPORT_XE_HP_CORE)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hp_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hp_core.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hp_core.h
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hp_core.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_xe_hp_core.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/image_xe_hp_core.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/image_xe_hp_core.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_xe_hp_core.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/sampler_xe_hp_core.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hp_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hp_core.cpp
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2021-2022 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.inl"
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0_tgllp_and_later.inl"
|
|
||||||
namespace L0 {
|
|
||||||
|
|
||||||
using Family = NEO::XeHpFamily;
|
|
||||||
|
|
||||||
DebuggerL0PopulateFactory<IGFX_XE_HP_CORE, Family> debuggerXE_HP_CORE;
|
|
||||||
|
|
||||||
template class DebuggerL0Hw<Family>;
|
|
||||||
|
|
||||||
} // namespace L0
|
|
||||||
@@ -9,7 +9,6 @@ if(SUPPORT_XE_HPC_CORE)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpc_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpc_core.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpc_core.h
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpc_core.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_xe_hpc_core.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hpc_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hpc_core.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_xe_hpc_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_xe_hpc_core.cpp
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2021-2022 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.inl"
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0_tgllp_and_later.inl"
|
|
||||||
namespace L0 {
|
|
||||||
|
|
||||||
using Family = NEO::XE_HPC_COREFamily;
|
|
||||||
|
|
||||||
template class DebuggerL0Hw<Family>;
|
|
||||||
static DebuggerL0PopulateFactory<IGFX_XE_HPC_CORE, Family> debuggerXeHpcCore;
|
|
||||||
} // namespace L0
|
|
||||||
@@ -9,7 +9,6 @@ if(SUPPORT_XE_HPG_CORE)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.h
|
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_xe_hpg_core.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/image_xe_hpg_core.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/image_xe_hpg_core.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_xe_hpg_core.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/sampler_xe_hpg_core.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hpg_core.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hpg_core.cpp
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2021-2022 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.inl"
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0_tgllp_and_later.inl"
|
|
||||||
namespace L0 {
|
|
||||||
|
|
||||||
using Family = NEO::XE_HPG_COREFamily;
|
|
||||||
|
|
||||||
template class DebuggerL0Hw<Family>;
|
|
||||||
static DebuggerL0PopulateFactory<IGFX_XE_HPG_CORE, Family> debuggerXeHpgCore;
|
|
||||||
} // namespace L0
|
|
||||||
@@ -133,16 +133,16 @@ HWTEST2_F(DebuggerSingleAddressSpaceAub, GivenSingleAddressSpaceWhenCmdListIsExe
|
|||||||
auto dynamicStateBaseAddress = commandList->commandContainer.getIndirectHeap(HeapType::DYNAMIC_STATE)->getGraphicsAllocation()->getGpuAddress();
|
auto dynamicStateBaseAddress = commandList->commandContainer.getIndirectHeap(HeapType::DYNAMIC_STATE)->getGraphicsAllocation()->getGpuAddress();
|
||||||
auto surfaceStateBaseAddress = commandList->commandContainer.getIndirectHeap(HeapType::SURFACE_STATE)->getGraphicsAllocation()->getGpuAddress();
|
auto surfaceStateBaseAddress = commandList->commandContainer.getIndirectHeap(HeapType::SURFACE_STATE)->getGraphicsAllocation()->getGpuAddress();
|
||||||
|
|
||||||
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, SurfaceStateBaseAddress)),
|
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, SurfaceStateBaseAddress)),
|
||||||
&surfaceStateBaseAddress, sizeof(surfaceStateBaseAddress));
|
&surfaceStateBaseAddress, sizeof(surfaceStateBaseAddress));
|
||||||
|
|
||||||
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, DynamicStateBaseAddress)),
|
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, DynamicStateBaseAddress)),
|
||||||
&dynamicStateBaseAddress, sizeof(dynamicStateBaseAddress));
|
&dynamicStateBaseAddress, sizeof(dynamicStateBaseAddress));
|
||||||
|
|
||||||
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, InstructionBaseAddress)),
|
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, InstructionBaseAddress)),
|
||||||
&instructionHeapBaseAddress, sizeof(instructionHeapBaseAddress));
|
&instructionHeapBaseAddress, sizeof(instructionHeapBaseAddress));
|
||||||
|
|
||||||
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, BindlessSurfaceStateBaseAddress)),
|
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, BindlessSurfaceStateBaseAddress)),
|
||||||
&surfaceStateBaseAddress, sizeof(surfaceStateBaseAddress));
|
&surfaceStateBaseAddress, sizeof(surfaceStateBaseAddress));
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zeKernelDestroy(kernel));
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zeKernelDestroy(kernel));
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ namespace L0 {
|
|||||||
namespace ult {
|
namespace ult {
|
||||||
static MockDebuggerL0HwPopulateFactory<IGFX_GEN11_CORE, NEO::GfxFamily> mockDebuggerGen11;
|
static MockDebuggerL0HwPopulateFactory<IGFX_GEN11_CORE, NEO::GfxFamily> mockDebuggerGen11;
|
||||||
}
|
}
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace NEO {
|
|||||||
|
|
||||||
struct TGLLPFamily;
|
struct TGLLPFamily;
|
||||||
using GfxFamily = TGLLPFamily;
|
using GfxFamily = TGLLPFamily;
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
||||||
namespace L0 {
|
namespace L0 {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#include "level_zero/core/test/unit_tests/mocks/mock_l0_debugger.h"
|
#include "level_zero/core/test/unit_tests/mocks/mock_l0_debugger.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
struct SKLFamily;
|
struct SKLFamily;
|
||||||
using GfxFamily = SKLFamily;
|
using GfxFamily = SKLFamily;
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|||||||
@@ -9,17 +9,14 @@
|
|||||||
|
|
||||||
#include "level_zero/core/test/unit_tests/mocks/mock_l0_debugger.h"
|
#include "level_zero/core/test/unit_tests/mocks/mock_l0_debugger.h"
|
||||||
|
|
||||||
namespace L0 {
|
NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[IGFX_MAX_CORE];
|
||||||
namespace ult {
|
|
||||||
DebugerL0CreateFn mockDebuggerL0HwFactory[IGFX_MAX_CORE];
|
|
||||||
}
|
|
||||||
} // namespace L0
|
|
||||||
|
|
||||||
namespace L0 {
|
namespace NEO {
|
||||||
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
|
||||||
|
std::unique_ptr<Debugger> DebuggerL0::create(NEO::Device *device) {
|
||||||
initDebuggingInOs(device->getRootDeviceEnvironment().osInterface.get());
|
initDebuggingInOs(device->getRootDeviceEnvironment().osInterface.get());
|
||||||
auto debugger = ult::mockDebuggerL0HwFactory[device->getHardwareInfo().platform.eRenderCoreFamily](device);
|
auto debugger = mockDebuggerL0HwFactory[device->getHardwareInfo().platform.eRenderCoreFamily](device);
|
||||||
return std::unique_ptr<DebuggerL0>(debugger);
|
return std::unique_ptr<DebuggerL0>(debugger);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -6,48 +6,50 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/kernel/debug_data.h"
|
#include "shared/source/kernel/debug_data.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
extern NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[];
|
||||||
#include "level_zero/core/test/unit_tests/white_box.h"
|
|
||||||
|
|
||||||
namespace L0 {
|
namespace L0 {
|
||||||
namespace ult {
|
namespace ult {
|
||||||
extern DebugerL0CreateFn mockDebuggerL0HwFactory[];
|
|
||||||
|
template <class BaseClass>
|
||||||
|
struct WhiteBox;
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
class MockDebuggerL0Hw : public L0::DebuggerL0Hw<GfxFamily> {
|
class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
|
||||||
public:
|
public:
|
||||||
using L0::DebuggerL0::perContextSbaAllocations;
|
using NEO::DebuggerL0::perContextSbaAllocations;
|
||||||
using L0::DebuggerL0::sbaTrackingGpuVa;
|
using NEO::DebuggerL0::sbaTrackingGpuVa;
|
||||||
using L0::DebuggerL0::singleAddressSpaceSbaTracking;
|
using NEO::DebuggerL0::singleAddressSpaceSbaTracking;
|
||||||
|
|
||||||
MockDebuggerL0Hw(NEO::Device *device) : L0::DebuggerL0Hw<GfxFamily>(device) {}
|
MockDebuggerL0Hw(NEO::Device *device) : NEO::DebuggerL0Hw<GfxFamily>(device) {}
|
||||||
~MockDebuggerL0Hw() override = default;
|
~MockDebuggerL0Hw() override = default;
|
||||||
|
|
||||||
static DebuggerL0 *allocate(NEO::Device *device) {
|
static NEO::DebuggerL0 *allocate(NEO::Device *device) {
|
||||||
return new MockDebuggerL0Hw<GfxFamily>(device);
|
return new MockDebuggerL0Hw<GfxFamily>(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
void captureStateBaseAddress(NEO::LinearStream &cmdStream, NEO::Debugger::SbaAddresses sba) override {
|
void captureStateBaseAddress(NEO::LinearStream &cmdStream, NEO::Debugger::SbaAddresses sba) override {
|
||||||
captureStateBaseAddressCount++;
|
captureStateBaseAddressCount++;
|
||||||
L0::DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(cmdStream, sba);
|
NEO::DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(cmdStream, sba);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t getSbaTrackingCommandsSize(size_t trackedAddressCount) override {
|
size_t getSbaTrackingCommandsSize(size_t trackedAddressCount) override {
|
||||||
getSbaTrackingCommandsSizeCount++;
|
getSbaTrackingCommandsSizeCount++;
|
||||||
return L0::DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(trackedAddressCount);
|
return NEO::DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(trackedAddressCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void programSbaTrackingCommands(NEO::LinearStream &cmdStream, const NEO::Debugger::SbaAddresses &sba) override {
|
void programSbaTrackingCommands(NEO::LinearStream &cmdStream, const NEO::Debugger::SbaAddresses &sba) override {
|
||||||
programSbaTrackingCommandsCount++;
|
programSbaTrackingCommandsCount++;
|
||||||
L0::DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(cmdStream, sba);
|
NEO::DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(cmdStream, sba);
|
||||||
}
|
}
|
||||||
|
|
||||||
void registerElf(NEO::DebugData *debugData, NEO::GraphicsAllocation *isaAllocation) override {
|
void registerElf(NEO::DebugData *debugData, NEO::GraphicsAllocation *isaAllocation) override {
|
||||||
registerElfCount++;
|
registerElfCount++;
|
||||||
lastReceivedElf = debugData->vIsa;
|
lastReceivedElf = debugData->vIsa;
|
||||||
L0::DebuggerL0Hw<GfxFamily>::registerElf(debugData, isaAllocation);
|
NEO::DebuggerL0Hw<GfxFamily>::registerElf(debugData, isaAllocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool attachZebinModuleToSegmentAllocations(const StackVec<NEO::GraphicsAllocation *, 32> &allocs, uint32_t &moduleHandle) override {
|
bool attachZebinModuleToSegmentAllocations(const StackVec<NEO::GraphicsAllocation *, 32> &allocs, uint32_t &moduleHandle) override {
|
||||||
@@ -56,22 +58,22 @@ class MockDebuggerL0Hw : public L0::DebuggerL0Hw<GfxFamily> {
|
|||||||
moduleHandle = moduleHandleToReturn;
|
moduleHandle = moduleHandleToReturn;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return L0::DebuggerL0Hw<GfxFamily>::attachZebinModuleToSegmentAllocations(allocs, moduleHandle);
|
return NEO::DebuggerL0Hw<GfxFamily>::attachZebinModuleToSegmentAllocations(allocs, moduleHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool removeZebinModule(uint32_t moduleHandle) override {
|
bool removeZebinModule(uint32_t moduleHandle) override {
|
||||||
removedZebinModuleHandle = moduleHandle;
|
removedZebinModuleHandle = moduleHandle;
|
||||||
return L0::DebuggerL0Hw<GfxFamily>::removeZebinModule(moduleHandle);
|
return NEO::DebuggerL0Hw<GfxFamily>::removeZebinModule(moduleHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void notifyCommandQueueCreated() override {
|
void notifyCommandQueueCreated() override {
|
||||||
commandQueueCreatedCount++;
|
commandQueueCreatedCount++;
|
||||||
L0::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated();
|
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void notifyCommandQueueDestroyed() override {
|
void notifyCommandQueueDestroyed() override {
|
||||||
commandQueueDestroyedCount++;
|
commandQueueDestroyedCount++;
|
||||||
L0::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed();
|
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t captureStateBaseAddressCount = 0;
|
uint32_t captureStateBaseAddressCount = 0;
|
||||||
@@ -87,18 +89,17 @@ class MockDebuggerL0Hw : public L0::DebuggerL0Hw<GfxFamily> {
|
|||||||
uint32_t moduleHandleToReturn = std::numeric_limits<uint32_t>::max();
|
uint32_t moduleHandleToReturn = std::numeric_limits<uint32_t>::max();
|
||||||
};
|
};
|
||||||
|
|
||||||
template <uint32_t productFamily, typename GfxFamily>
|
|
||||||
struct MockDebuggerL0HwPopulateFactory {
|
|
||||||
MockDebuggerL0HwPopulateFactory() {
|
|
||||||
mockDebuggerL0HwFactory[productFamily] = MockDebuggerL0Hw<GfxFamily>::allocate;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct WhiteBox<::L0::DebuggerL0> : public ::L0::DebuggerL0 {
|
struct WhiteBox<NEO::DebuggerL0> : public NEO::DebuggerL0 {
|
||||||
using BaseClass = ::L0::DebuggerL0;
|
using BaseClass = NEO::DebuggerL0;
|
||||||
using BaseClass::initDebuggingInOs;
|
using BaseClass::initDebuggingInOs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <uint32_t productFamily, typename GfxFamily>
|
||||||
|
struct MockDebuggerL0HwPopulateFactory {
|
||||||
|
MockDebuggerL0HwPopulateFactory() {
|
||||||
|
mockDebuggerL0HwFactory[productFamily] = L0::ult::MockDebuggerL0Hw<GfxFamily>::allocate;
|
||||||
|
}
|
||||||
|
};
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
@@ -94,7 +94,7 @@ TEST(L0DebuggerLinux, givenVmBindAndPerContextVmEnabledInDrmWhenInitializingDebu
|
|||||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
|
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
|
||||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
|
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
|
||||||
|
|
||||||
auto result = WhiteBox<::L0::DebuggerL0>::initDebuggingInOs(osInterface);
|
auto result = WhiteBox<NEO::DebuggerL0>::initDebuggingInOs(osInterface);
|
||||||
EXPECT_TRUE(result);
|
EXPECT_TRUE(result);
|
||||||
EXPECT_TRUE(drmMock->registerClassesCalled);
|
EXPECT_TRUE(drmMock->registerClassesCalled);
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ TEST(L0DebuggerLinux, givenVmBindNotAvailableInDrmWhenInitializingDebuggingInOsT
|
|||||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
|
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
|
||||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
|
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
|
||||||
|
|
||||||
auto result = WhiteBox<::L0::DebuggerL0>::initDebuggingInOs(osInterface);
|
auto result = WhiteBox<NEO::DebuggerL0>::initDebuggingInOs(osInterface);
|
||||||
EXPECT_FALSE(result);
|
EXPECT_FALSE(result);
|
||||||
EXPECT_FALSE(drmMock->registerClassesCalled);
|
EXPECT_FALSE(drmMock->registerClassesCalled);
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ TEST(L0DebuggerLinux, givenPerContextVmNotEnabledWhenInitializingDebuggingInOsTh
|
|||||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
|
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
|
||||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
|
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
|
||||||
|
|
||||||
auto result = WhiteBox<::L0::DebuggerL0>::initDebuggingInOs(osInterface);
|
auto result = WhiteBox<NEO::DebuggerL0>::initDebuggingInOs(osInterface);
|
||||||
EXPECT_FALSE(result);
|
EXPECT_FALSE(result);
|
||||||
EXPECT_FALSE(drmMock->registerClassesCalled);
|
EXPECT_FALSE(drmMock->registerClassesCalled);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ HWTEST_P(L0DebuggerParameterizedTests, givenL0DebuggerWhenCreatedThenPerContextS
|
|||||||
}
|
}
|
||||||
std::vector<NEO::GraphicsAllocation *> allocations;
|
std::vector<NEO::GraphicsAllocation *> allocations;
|
||||||
|
|
||||||
auto &allEngines = device->getNEODevice()->getMemoryManager()->getRegisteredEngines();
|
auto &allEngines = neoDevice->getMemoryManager()->getRegisteredEngines();
|
||||||
|
|
||||||
for (auto &engine : allEngines) {
|
for (auto &engine : allEngines) {
|
||||||
auto sbaAllocation = debugger->getSbaTrackingBuffer(engine.osContext->getContextId());
|
auto sbaAllocation = debugger->getSbaTrackingBuffer(engine.osContext->getContextId());
|
||||||
@@ -86,7 +86,7 @@ HWTEST_F(L0DebuggerTest, givenCreatedL0DebuggerThenSbaTrackingBuffersContainVali
|
|||||||
auto sbaAllocation = sbaBuffer.second;
|
auto sbaAllocation = sbaBuffer.second;
|
||||||
ASSERT_NE(nullptr, sbaAllocation);
|
ASSERT_NE(nullptr, sbaAllocation);
|
||||||
|
|
||||||
auto sbaHeader = reinterpret_cast<SbaTrackedAddresses *>(sbaAllocation->getUnderlyingBuffer());
|
auto sbaHeader = reinterpret_cast<NEO::SbaTrackedAddresses *>(sbaAllocation->getUnderlyingBuffer());
|
||||||
|
|
||||||
EXPECT_STREQ("sbaarea", sbaHeader->magic);
|
EXPECT_STREQ("sbaarea", sbaHeader->magic);
|
||||||
EXPECT_EQ(0u, sbaHeader->BindlessSamplerStateBaseAddress);
|
EXPECT_EQ(0u, sbaHeader->BindlessSamplerStateBaseAddress);
|
||||||
@@ -146,8 +146,8 @@ HWTEST_F(L0DebuggerMultiSubDeviceTest, givenMultiSubDevicesWhenSbaTrackingBuffer
|
|||||||
EXPECT_TRUE(storageInfo.tileInstanced);
|
EXPECT_TRUE(storageInfo.tileInstanced);
|
||||||
|
|
||||||
for (uint32_t i = 0; i < numSubDevices; i++) {
|
for (uint32_t i = 0; i < numSubDevices; i++) {
|
||||||
auto sbaHeader = reinterpret_cast<SbaTrackedAddresses *>(ptrOffset(debugger->perContextSbaAllocations[contextId]->getUnderlyingBuffer(),
|
auto sbaHeader = reinterpret_cast<NEO::SbaTrackedAddresses *>(ptrOffset(debugger->perContextSbaAllocations[contextId]->getUnderlyingBuffer(),
|
||||||
debugger->perContextSbaAllocations[contextId]->getUnderlyingBufferSize() * i));
|
debugger->perContextSbaAllocations[contextId]->getUnderlyingBufferSize() * i));
|
||||||
|
|
||||||
EXPECT_STREQ("sbaarea", sbaHeader->magic);
|
EXPECT_STREQ("sbaarea", sbaHeader->magic);
|
||||||
EXPECT_EQ(0u, sbaHeader->BindlessSamplerStateBaseAddress);
|
EXPECT_EQ(0u, sbaHeader->BindlessSamplerStateBaseAddress);
|
||||||
@@ -245,7 +245,7 @@ HWTEST2_F(L0DebuggerPerContextAddressSpaceTest, givenDebuggingEnabledAndRequired
|
|||||||
EXPECT_EQ(static_cast<uint32_t>(gsbaGpuVa & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(gsbaGpuVa & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(gsbaGpuVa >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(gsbaGpuVa >> 32), cmdSdi->getDataDword1());
|
||||||
|
|
||||||
auto expectedGpuVa = gmmHelper->decanonize(device->getL0Debugger()->getSbaTrackingGpuVa()) + offsetof(SbaTrackedAddresses, GeneralStateBaseAddress);
|
auto expectedGpuVa = gmmHelper->decanonize(device->getL0Debugger()->getSbaTrackingGpuVa()) + offsetof(NEO::SbaTrackedAddresses, GeneralStateBaseAddress);
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
|
|
||||||
for (auto i = 0u; i < numCommandLists; i++) {
|
for (auto i = 0u; i < numCommandLists; i++) {
|
||||||
@@ -415,7 +415,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
|
|||||||
auto debugger = std::make_unique<MockDebuggerL0Hw<FamilyType>>(neoDevice);
|
auto debugger = std::make_unique<MockDebuggerL0Hw<FamilyType>>(neoDevice);
|
||||||
debugger->singleAddressSpaceSbaTracking = 0;
|
debugger->singleAddressSpaceSbaTracking = 0;
|
||||||
debugger->sbaTrackingGpuVa.address = 0x45670000;
|
debugger->sbaTrackingGpuVa.address = 0x45670000;
|
||||||
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, GeneralStateBaseAddress);
|
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, GeneralStateBaseAddress);
|
||||||
|
|
||||||
StackVec<char, 4096> buffer(4096);
|
StackVec<char, 4096> buffer(4096);
|
||||||
NEO::LinearStream cmdStream(buffer.begin(), buffer.size());
|
NEO::LinearStream cmdStream(buffer.begin(), buffer.size());
|
||||||
@@ -452,7 +452,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, SurfaceStateBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, SurfaceStateBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
@@ -461,7 +461,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, DynamicStateBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, DynamicStateBaseAddress);
|
||||||
|
|
||||||
EXPECT_EQ(static_cast<uint32_t>(dsba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(dsba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(dsba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(dsba >> 32), cmdSdi->getDataDword1());
|
||||||
@@ -471,7 +471,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, IndirectObjectBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, IndirectObjectBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ioba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(ioba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ioba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(ioba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
@@ -480,7 +480,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, InstructionBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, InstructionBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(iba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(iba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(iba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(iba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
@@ -489,7 +489,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
@@ -501,7 +501,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
|
|||||||
auto debugger = std::make_unique<MockDebuggerL0Hw<FamilyType>>(neoDevice);
|
auto debugger = std::make_unique<MockDebuggerL0Hw<FamilyType>>(neoDevice);
|
||||||
|
|
||||||
debugger->sbaTrackingGpuVa.address = 0x45670000;
|
debugger->sbaTrackingGpuVa.address = 0x45670000;
|
||||||
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, GeneralStateBaseAddress);
|
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, GeneralStateBaseAddress);
|
||||||
|
|
||||||
StackVec<char, 4096> buffer(4096);
|
StackVec<char, 4096> buffer(4096);
|
||||||
NEO::LinearStream cmdStream(buffer.begin(), buffer.size());
|
NEO::LinearStream cmdStream(buffer.begin(), buffer.size());
|
||||||
@@ -538,7 +538,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, SurfaceStateBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, SurfaceStateBaseAddress);
|
||||||
|
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
||||||
@@ -548,7 +548,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, DynamicStateBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, DynamicStateBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(dsba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(dsba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(dsba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(dsba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
@@ -557,7 +557,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, IndirectObjectBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, IndirectObjectBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ioba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(ioba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ioba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(ioba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
@@ -566,7 +566,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, InstructionBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, InstructionBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(iba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(iba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(iba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(iba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
@@ -575,7 +575,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
|
|||||||
sdiItor++;
|
sdiItor++;
|
||||||
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
|
||||||
|
|
||||||
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
|
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
|
||||||
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
|
||||||
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/device_binary_format/patchtokens_decoder.h"
|
#include "shared/source/device_binary_format/patchtokens_decoder.h"
|
||||||
#include "shared/source/helpers/local_memory_access_modes.h"
|
#include "shared/source/helpers/local_memory_access_modes.h"
|
||||||
#include "shared/source/helpers/ray_tracing_helper.h"
|
#include "shared/source/helpers/ray_tracing_helper.h"
|
||||||
@@ -20,7 +21,6 @@
|
|||||||
#include "shared/test/unit_test/compiler_interface/linker_mock.h"
|
#include "shared/test/unit_test/compiler_interface/linker_mock.h"
|
||||||
#include "shared/test/unit_test/device_binary_format/patchtokens_tests.h"
|
#include "shared/test/unit_test/device_binary_format/patchtokens_tests.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
|
||||||
#include "level_zero/core/source/image/image_format_desc_helper.h"
|
#include "level_zero/core/source/image/image_format_desc_helper.h"
|
||||||
#include "level_zero/core/source/image/image_hw.h"
|
#include "level_zero/core/source/image/image_hw.h"
|
||||||
#include "level_zero/core/source/kernel/kernel_hw.h"
|
#include "level_zero/core/source/kernel/kernel_hw.h"
|
||||||
|
|||||||
@@ -16,4 +16,4 @@ namespace L0 {
|
|||||||
namespace ult {
|
namespace ult {
|
||||||
static MockDebuggerL0HwPopulateFactory<IGFX_XE_HPC_CORE, NEO::GfxFamily> mockDebuggerXeHpcCore;
|
static MockDebuggerL0HwPopulateFactory<IGFX_XE_HPC_CORE, NEO::GfxFamily> mockDebuggerXeHpcCore;
|
||||||
}
|
}
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -16,4 +16,4 @@ namespace L0 {
|
|||||||
namespace ult {
|
namespace ult {
|
||||||
static MockDebuggerL0HwPopulateFactory<IGFX_XE_HPG_CORE, NEO::GfxFamily> mockDebuggerXeHpgCore;
|
static MockDebuggerL0HwPopulateFactory<IGFX_XE_HPG_CORE, NEO::GfxFamily> mockDebuggerXeHpgCore;
|
||||||
}
|
}
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/os_interface/os_thread.h"
|
#include "shared/source/os_interface/os_thread.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
|
||||||
#include "level_zero/tools/source/debug/eu_thread.h"
|
#include "level_zero/tools/source/debug/eu_thread.h"
|
||||||
#include <level_zero/ze_api.h>
|
#include <level_zero/ze_api.h>
|
||||||
#include <level_zero/zet_api.h>
|
#include <level_zero/zet_api.h>
|
||||||
@@ -104,7 +104,7 @@ struct DebugSession : _zet_debug_session_handle_t {
|
|||||||
|
|
||||||
virtual bool isBindlessSystemRoutine();
|
virtual bool isBindlessSystemRoutine();
|
||||||
virtual bool readModuleDebugArea() = 0;
|
virtual bool readModuleDebugArea() = 0;
|
||||||
virtual ze_result_t readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) = 0;
|
virtual ze_result_t readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) = 0;
|
||||||
|
|
||||||
void fillDevicesFromThread(ze_device_thread_t thread, std::vector<uint8_t> &devices);
|
void fillDevicesFromThread(ze_device_thread_t thread, std::vector<uint8_t> &devices);
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ struct DebugSession : _zet_debug_session_handle_t {
|
|||||||
|
|
||||||
size_t getPerThreadScratchOffset(size_t ptss, EuThread::ThreadId threadId);
|
size_t getPerThreadScratchOffset(size_t ptss, EuThread::ThreadId threadId);
|
||||||
|
|
||||||
DebugAreaHeader debugArea;
|
NEO::DebugAreaHeader debugArea;
|
||||||
|
|
||||||
Device *connectedDevice = nullptr;
|
Device *connectedDevice = nullptr;
|
||||||
std::map<uint64_t, std::unique_ptr<EuThread>> allThreads;
|
std::map<uint64_t, std::unique_ptr<EuThread>> allThreads;
|
||||||
|
|||||||
@@ -817,7 +817,7 @@ ze_result_t DebugSessionImp::readSbaRegisters(ze_device_thread_t thread, uint32_
|
|||||||
|
|
||||||
ze_result_t ret = ZE_RESULT_SUCCESS;
|
ze_result_t ret = ZE_RESULT_SUCCESS;
|
||||||
|
|
||||||
SbaTrackedAddresses sbaBuffer;
|
NEO::SbaTrackedAddresses sbaBuffer;
|
||||||
ret = readSbaBuffer(convertToThreadId(thread), sbaBuffer);
|
ret = readSbaBuffer(convertToThreadId(thread), sbaBuffer);
|
||||||
if (ret != ZE_RESULT_SUCCESS) {
|
if (ret != ZE_RESULT_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ bool DebugSessionLinux::readModuleDebugArea() {
|
|||||||
memset(this->debugArea.magic, 0, sizeof(this->debugArea.magic));
|
memset(this->debugArea.magic, 0, sizeof(this->debugArea.magic));
|
||||||
auto retVal = readGpuMemory(vm, reinterpret_cast<char *>(&this->debugArea), sizeof(this->debugArea), gpuVa);
|
auto retVal = readGpuMemory(vm, reinterpret_cast<char *>(&this->debugArea), sizeof(this->debugArea), gpuVa);
|
||||||
|
|
||||||
if (retVal != ZE_RESULT_SUCCESS || strncmp(this->debugArea.magic, "dbgarea", sizeof(DebugAreaHeader::magic)) != 0) {
|
if (retVal != ZE_RESULT_SUCCESS || strncmp(this->debugArea.magic, "dbgarea", sizeof(NEO::DebugAreaHeader::magic)) != 0) {
|
||||||
PRINT_DEBUGGER_ERROR_LOG("Reading Module Debug Area failed, error = %d\n", retVal);
|
PRINT_DEBUGGER_ERROR_LOG("Reading Module Debug Area failed, error = %d\n", retVal);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1444,7 +1444,7 @@ bool DebugSessionLinux::readSystemRoutineIdent(EuThread *thread, uint64_t vmHand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t DebugSessionLinux::readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) {
|
ze_result_t DebugSessionLinux::readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) {
|
||||||
auto vmHandle = allThreads[threadId]->getMemoryHandle();
|
auto vmHandle = allThreads[threadId]->getMemoryHandle();
|
||||||
|
|
||||||
if (vmHandle == invalidHandle) {
|
if (vmHandle == invalidHandle) {
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ struct DebugSessionLinux : DebugSessionImp {
|
|||||||
uint64_t extractVaFromUuidString(std::string &uuid);
|
uint64_t extractVaFromUuidString(std::string &uuid);
|
||||||
|
|
||||||
bool readModuleDebugArea() override;
|
bool readModuleDebugArea() override;
|
||||||
ze_result_t readSbaBuffer(EuThread::ThreadId, SbaTrackedAddresses &sbaBuffer) override;
|
ze_result_t readSbaBuffer(EuThread::ThreadId, NEO::SbaTrackedAddresses &sbaBuffer) override;
|
||||||
void readStateSaveAreaHeader() override;
|
void readStateSaveAreaHeader() override;
|
||||||
|
|
||||||
void applyResumeWa(std::vector<ze_device_thread_t> threads, uint8_t *bitmask, size_t bitmaskSize);
|
void applyResumeWa(std::vector<ze_device_thread_t> threads, uint8_t *bitmask, size_t bitmaskSize);
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ bool DebugSessionWindows::readModuleDebugArea() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t DebugSessionWindows::readSbaBuffer(EuThread::ThreadId, SbaTrackedAddresses &sbaBuffer) {
|
ze_result_t DebugSessionWindows::readSbaBuffer(EuThread::ThreadId, NEO::SbaTrackedAddresses &sbaBuffer) {
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ struct DebugSessionWindows : DebugSessionImp {
|
|||||||
bool isVAElf(const zet_debug_memory_space_desc_t *desc, size_t size);
|
bool isVAElf(const zet_debug_memory_space_desc_t *desc, size_t size);
|
||||||
ze_result_t readElfSpace(const zet_debug_memory_space_desc_t *desc, size_t size, void *buffer);
|
ze_result_t readElfSpace(const zet_debug_memory_space_desc_t *desc, size_t size, void *buffer);
|
||||||
|
|
||||||
ze_result_t readSbaBuffer(EuThread::ThreadId, SbaTrackedAddresses &sbaBuffer) override;
|
ze_result_t readSbaBuffer(EuThread::ThreadId, NEO::SbaTrackedAddresses &sbaBuffer) override;
|
||||||
|
|
||||||
MOCKABLE_VIRTUAL ze_result_t readAndHandleEvent(uint64_t timeoutMs);
|
MOCKABLE_VIRTUAL ze_result_t readAndHandleEvent(uint64_t timeoutMs);
|
||||||
ze_result_t handleModuleCreateEvent(DBGUMD_READ_EVENT_MODULE_CREATE_EVENT_PARAMS &moduleCreateParams);
|
ze_result_t handleModuleCreateEvent(DBGUMD_READ_EVENT_MODULE_CREATE_EVENT_PARAMS &moduleCreateParams);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ struct MockDebugSession : public L0::DebugSessionImp {
|
|||||||
return DebugSessionImp::writeRegistersImp(thread, type, start, count, pRegisterValues);
|
return DebugSessionImp::writeRegistersImp(thread, type, start, count, pRegisterValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) override {
|
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) override {
|
||||||
sbaBuffer = sba;
|
sbaBuffer = sba;
|
||||||
return readSbaBufferResult;
|
return readSbaBufferResult;
|
||||||
}
|
}
|
||||||
@@ -246,7 +246,7 @@ struct MockDebugSession : public L0::DebugSessionImp {
|
|||||||
std::vector<uint32_t> resumedDevices;
|
std::vector<uint32_t> resumedDevices;
|
||||||
std::vector<std::vector<ze_device_thread_t>> resumedThreads;
|
std::vector<std::vector<ze_device_thread_t>> resumedThreads;
|
||||||
|
|
||||||
SbaTrackedAddresses sba;
|
NEO::SbaTrackedAddresses sba;
|
||||||
uint64_t readMemoryBuffer[64];
|
uint64_t readMemoryBuffer[64];
|
||||||
uint64_t regs[16];
|
uint64_t regs[16];
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ struct DebugSessionMock : public L0::DebugSession {
|
|||||||
ze_result_t writeRegisters(ze_device_thread_t thread, uint32_t type, uint32_t start, uint32_t count, void *pRegisterValues) override {
|
ze_result_t writeRegisters(ze_device_thread_t thread, uint32_t type, uint32_t start, uint32_t count, void *pRegisterValues) override {
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||||
}
|
}
|
||||||
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) override {
|
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) override {
|
||||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||||
}
|
}
|
||||||
void startAsyncThread() override {
|
void startAsyncThread() override {
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ if(WIN32)
|
|||||||
NEO_CORE_OS_INTERFACE_WDDM
|
NEO_CORE_OS_INTERFACE_WDDM
|
||||||
NEO_CORE_PAGE_FAULT_MANAGER_WINDOWS
|
NEO_CORE_PAGE_FAULT_MANAGER_WINDOWS
|
||||||
NEO_CORE_SKU_INFO_WINDOWS
|
NEO_CORE_SKU_INFO_WINDOWS
|
||||||
|
NEO_CORE_SRCS_DEBUGGER_WINDOWS
|
||||||
NEO_CORE_SRCS_HELPERS_WINDOWS
|
NEO_CORE_SRCS_HELPERS_WINDOWS
|
||||||
NEO_CORE_UTILITIES_WINDOWS
|
NEO_CORE_UTILITIES_WINDOWS
|
||||||
NEO_CORE_EXECUTION_ENVIRONMENT_WDDM
|
NEO_CORE_EXECUTION_ENVIRONMENT_WDDM
|
||||||
@@ -162,6 +163,7 @@ else()
|
|||||||
NEO_CORE_DIRECT_SUBMISSION_LINUX
|
NEO_CORE_DIRECT_SUBMISSION_LINUX
|
||||||
NEO_CORE_OS_INTERFACE_LINUX
|
NEO_CORE_OS_INTERFACE_LINUX
|
||||||
NEO_CORE_PAGE_FAULT_MANAGER_LINUX
|
NEO_CORE_PAGE_FAULT_MANAGER_LINUX
|
||||||
|
NEO_CORE_SRCS_DEBUGGER_LINUX
|
||||||
NEO_CORE_UTILITIES_LINUX
|
NEO_CORE_UTILITIES_LINUX
|
||||||
NEO_CORE_EXECUTION_ENVIRONMENT_DRM
|
NEO_CORE_EXECUTION_ENVIRONMENT_DRM
|
||||||
NEO_CORE_AIL_LINUX
|
NEO_CORE_AIL_LINUX
|
||||||
|
|||||||
@@ -8,6 +8,14 @@ set(NEO_CORE_DEBUGGER
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger.h
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_base.inl
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_tgllp_and_later.inl
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY NEO_CORE_DEBUGGER ${NEO_CORE_DEBUGGER})
|
set_property(GLOBAL PROPERTY NEO_CORE_DEBUGGER ${NEO_CORE_DEBUGGER})
|
||||||
|
|
||||||
|
add_subdirectories()
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
|
|
||||||
#include "shared/source/command_container/cmdcontainer.h"
|
#include "shared/source/command_container/cmdcontainer.h"
|
||||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace L0 {
|
namespace NEO {
|
||||||
|
|
||||||
DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE] = {};
|
DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE] = {};
|
||||||
|
|
||||||
@@ -132,4 +132,4 @@ void DebuggerL0::notifyModuleLoadAllocations(const StackVec<NEO::GraphicsAllocat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -19,9 +19,7 @@ class Device;
|
|||||||
class GraphicsAllocation;
|
class GraphicsAllocation;
|
||||||
class LinearStream;
|
class LinearStream;
|
||||||
class OSInterface;
|
class OSInterface;
|
||||||
} // namespace NEO
|
|
||||||
|
|
||||||
namespace L0 {
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
struct SbaTrackedAddresses {
|
struct SbaTrackedAddresses {
|
||||||
char magic[8] = "sbaarea";
|
char magic[8] = "sbaarea";
|
||||||
@@ -156,4 +154,4 @@ struct DebuggerL0PopulateFactory {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -8,13 +8,12 @@
|
|||||||
#include "shared/source/command_container/command_encoder.h"
|
#include "shared/source/command_container/command_encoder.h"
|
||||||
#include "shared/source/command_stream/linear_stream.h"
|
#include "shared/source/command_stream/linear_stream.h"
|
||||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
|
||||||
|
|
||||||
#include "hw_cmds.h"
|
#include "hw_cmds.h"
|
||||||
|
|
||||||
namespace L0 {
|
namespace NEO {
|
||||||
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(NEO::LinearStream &cmdStream, const SbaAddresses &sba) {
|
void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(NEO::LinearStream &cmdStream, const SbaAddresses &sba) {
|
||||||
@@ -135,4 +134,4 @@ void DebuggerL0Hw<GfxFamily>::programSbaAddressLoad(NEO::LinearStream &cmdStream
|
|||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace L0 {
|
namespace NEO {
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(size_t trackedAddressCount) {
|
size_t DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(size_t trackedAddressCount) {
|
||||||
if (singleAddressSpaceSbaTracking) {
|
if (singleAddressSpaceSbaTracking) {
|
||||||
@@ -19,4 +19,4 @@ template <typename GfxFamily>
|
|||||||
void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::LinearStream &cmdStream, const SbaAddresses &sba) {
|
void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::LinearStream &cmdStream, const SbaAddresses &sba) {
|
||||||
UNRECOVERABLE_IF(true);
|
UNRECOVERABLE_IF(true);
|
||||||
}
|
}
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace L0 {
|
namespace NEO {
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
size_t DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(size_t trackedAddressCount) {
|
size_t DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(size_t trackedAddressCount) {
|
||||||
if (singleAddressSpaceSbaTracking) {
|
if (singleAddressSpaceSbaTracking) {
|
||||||
@@ -64,7 +64,7 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
|
|||||||
|
|
||||||
// Jump to SDI command that is modified
|
// Jump to SDI command that is modified
|
||||||
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
|
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
|
||||||
const auto nextCommand = ptrOffset(cmdStreamGpuBase, ptrDiff(reinterpret_cast<uint64_t>(cmdStream.getSpace(0)), cmdStreamCpuBase));
|
const auto nextCommand = ptrOffset(cmdStreamGpuBase, ptrDiff(cmdStream.getSpace(0), cmdStreamCpuBase));
|
||||||
|
|
||||||
MI_BATCH_BUFFER_START bbCmd = GfxFamily::cmdInitBatchBufferStart;
|
MI_BATCH_BUFFER_START bbCmd = GfxFamily::cmdInitBatchBufferStart;
|
||||||
bbCmd.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT);
|
bbCmd.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT);
|
||||||
@@ -95,7 +95,7 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
|
|||||||
|
|
||||||
// Jump to SDI command that is modified
|
// Jump to SDI command that is modified
|
||||||
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
|
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
|
||||||
const auto addressOfSDI = ptrOffset(cmdStreamGpuBase, ptrDiff(reinterpret_cast<uint64_t>(cmdStream.getSpace(0)), cmdStreamCpuBase));
|
const auto addressOfSDI = ptrOffset(cmdStreamGpuBase, ptrDiff(cmdStream.getSpace(0), cmdStreamCpuBase));
|
||||||
|
|
||||||
// Cmd to store value ( SBA address )
|
// Cmd to store value ( SBA address )
|
||||||
auto miStoreSbaField = cmdStream.getSpaceForCmd<MI_STORE_DATA_IMM>();
|
auto miStoreSbaField = cmdStream.getSpaceForCmd<MI_STORE_DATA_IMM>();
|
||||||
@@ -141,7 +141,7 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
|
|||||||
if (fieldOffsetAndValue.size()) {
|
if (fieldOffsetAndValue.size()) {
|
||||||
|
|
||||||
auto previousBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
|
auto previousBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
|
||||||
const auto addressOfPreviousBuffer = ptrOffset(cmdStreamGpuBase, ptrDiff(reinterpret_cast<uint64_t>(cmdStream.getSpace(0)), cmdStreamCpuBase));
|
const auto addressOfPreviousBuffer = ptrOffset(cmdStreamGpuBase, ptrDiff(cmdStream.getSpace(0), cmdStreamCpuBase));
|
||||||
|
|
||||||
MI_BATCH_BUFFER_START bbCmd = GfxFamily::cmdInitBatchBufferStart;
|
MI_BATCH_BUFFER_START bbCmd = GfxFamily::cmdInitBatchBufferStart;
|
||||||
bbCmd.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT);
|
bbCmd.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT);
|
||||||
@@ -156,4 +156,4 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -4,11 +4,9 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
#
|
#
|
||||||
|
|
||||||
set(L0_SRCS_DEBUGGER_LINUX
|
set(NEO_CORE_SRCS_DEBUGGER_LINUX
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_linux.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_linux.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(UNIX)
|
set_property(GLOBAL PROPERTY NEO_CORE_SRCS_DEBUGGER_LINUX ${NEO_CORE_SRCS_DEBUGGER_LINUX})
|
||||||
set_property(GLOBAL PROPERTY L0_SRCS_DEBUGGER_LINUX ${L0_SRCS_DEBUGGER_LINUX})
|
|
||||||
endif()
|
|
||||||
@@ -5,15 +5,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/device/device.h"
|
#include "shared/source/device/device.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/kernel/debug_data.h"
|
#include "shared/source/kernel/debug_data.h"
|
||||||
#include "shared/source/os_interface/linux/drm_allocation.h"
|
#include "shared/source/os_interface/linux/drm_allocation.h"
|
||||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||||
#include "shared/source/os_interface/os_interface.h"
|
#include "shared/source/os_interface/os_interface.h"
|
||||||
|
namespace NEO {
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
|
||||||
namespace L0 {
|
|
||||||
bool DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) {
|
bool DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) {
|
||||||
if (osInterface != nullptr) {
|
if (osInterface != nullptr) {
|
||||||
auto drm = osInterface->getDriverModel()->as<NEO::Drm>();
|
auto drm = osInterface->getDriverModel()->as<NEO::Drm>();
|
||||||
@@ -81,4 +80,4 @@ void DebuggerL0::notifyCommandQueueDestroyed() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -4,11 +4,9 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
#
|
#
|
||||||
|
|
||||||
set(L0_SRCS_DEBUGGER_WINDOWS
|
set(NEO_CORE_SRCS_DEBUGGER_WINDOWS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_windows.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_windows.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
set_property(GLOBAL PROPERTY NEO_CORE_SRCS_DEBUGGER_WINDOWS ${NEO_CORE_SRCS_DEBUGGER_WINDOWS})
|
||||||
set_property(GLOBAL PROPERTY L0_SRCS_DEBUGGER_WINDOWS ${L0_SRCS_DEBUGGER_WINDOWS})
|
|
||||||
endif()
|
|
||||||
@@ -5,14 +5,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/device/device.h"
|
#include "shared/source/device/device.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/kernel/debug_data.h"
|
#include "shared/source/kernel/debug_data.h"
|
||||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
namespace NEO {
|
||||||
|
|
||||||
namespace L0 {
|
|
||||||
bool DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) {
|
bool DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) {
|
||||||
|
|
||||||
if (osInterface == nullptr) {
|
if (osInterface == nullptr) {
|
||||||
@@ -46,4 +45,4 @@ void DebuggerL0::notifyCommandQueueCreated() {
|
|||||||
void DebuggerL0::notifyCommandQueueDestroyed() {
|
void DebuggerL0::notifyCommandQueueDestroyed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -5,13 +5,12 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/device/device.h"
|
#include "shared/source/device/device.h"
|
||||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||||
#include "shared/source/os_interface/os_interface.h"
|
#include "shared/source/os_interface/os_interface.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
namespace NEO {
|
||||||
|
|
||||||
namespace L0 {
|
|
||||||
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
||||||
auto &hwInfo = device->getHardwareInfo();
|
auto &hwInfo = device->getHardwareInfo();
|
||||||
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
|
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
|
||||||
@@ -25,4 +24,4 @@ std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
|||||||
return std::unique_ptr<DebuggerL0>(nullptr);
|
return std::unique_ptr<DebuggerL0>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
|
|
||||||
namespace L0 {
|
namespace NEO {
|
||||||
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
||||||
auto &hwInfo = device->getHardwareInfo();
|
auto &hwInfo = device->getHardwareInfo();
|
||||||
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
|
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
|
||||||
@@ -20,4 +20,4 @@ std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
|||||||
}
|
}
|
||||||
return std::unique_ptr<DebuggerL0>(nullptr);
|
return std::unique_ptr<DebuggerL0>(nullptr);
|
||||||
}
|
}
|
||||||
} // namespace L0
|
} // namespace NEO
|
||||||
@@ -18,6 +18,7 @@ set(CORE_RUNTIME_SRCS_COREX_CPP_BASE
|
|||||||
command_stream_receiver_hw
|
command_stream_receiver_hw
|
||||||
command_stream_receiver_simulated_common_hw
|
command_stream_receiver_simulated_common_hw
|
||||||
create_device_command_stream_receiver
|
create_device_command_stream_receiver
|
||||||
|
debugger
|
||||||
direct_submission
|
direct_submission
|
||||||
experimental_command_buffer
|
experimental_command_buffer
|
||||||
implicit_scaling
|
implicit_scaling
|
||||||
|
|||||||
23
shared/source/gen11/debugger_gen11.cpp
Normal file
23
shared/source/gen11/debugger_gen11.cpp
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.inl"
|
||||||
|
#include "shared/source/debugger/debugger_l0_base.inl"
|
||||||
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
struct ICLFamily;
|
||||||
|
using GfxFamily = ICLFamily;
|
||||||
|
static auto coreFamily = IGFX_GEN11_CORE;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||||
|
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||||
|
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||||
|
}
|
||||||
|
template class DebuggerL0Hw<GfxFamily>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Intel Corporation
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/gen11/hw_cmds.h"
|
#include "shared/source/gen11/hw_cmds.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/populate_factory.h"
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
@@ -25,6 +26,7 @@ struct EnableCoreGen11 {
|
|||||||
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||||
|
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
24
shared/source/gen12lp/debugger_gen12lp.cpp
Normal file
24
shared/source/gen12lp/debugger_gen12lp.cpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.inl"
|
||||||
|
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
|
||||||
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
|
||||||
|
using Family = NEO::TGLLPFamily;
|
||||||
|
|
||||||
|
static auto coreFamily = IGFX_GEN12LP_CORE;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void populateFactoryTable<DebuggerL0Hw<Family>>() {
|
||||||
|
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||||
|
debuggerL0Factory[coreFamily] = DebuggerL0Hw<Family>::allocate;
|
||||||
|
}
|
||||||
|
template class DebuggerL0Hw<Family>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Intel Corporation
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/gen12lp/hw_cmds.h"
|
#include "shared/source/gen12lp/hw_cmds.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/populate_factory.h"
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
@@ -25,6 +26,7 @@ struct EnableCoreGen12LP {
|
|||||||
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||||
|
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
24
shared/source/gen8/debugger_gen8.cpp
Normal file
24
shared/source/gen8/debugger_gen8.cpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.inl"
|
||||||
|
#include "shared/source/debugger/debugger_l0_base.inl"
|
||||||
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
|
||||||
|
struct BDWFamily;
|
||||||
|
using GfxFamily = BDWFamily;
|
||||||
|
static auto coreFamily = IGFX_GEN8_CORE;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||||
|
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||||
|
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||||
|
}
|
||||||
|
template class DebuggerL0Hw<GfxFamily>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Intel Corporation
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/gen8/hw_cmds.h"
|
#include "shared/source/gen8/hw_cmds.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/populate_factory.h"
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
@@ -27,6 +28,7 @@ struct EnableCoreGen8 {
|
|||||||
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||||
|
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
24
shared/source/gen9/debugger_gen9.cpp
Normal file
24
shared/source/gen9/debugger_gen9.cpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.inl"
|
||||||
|
#include "shared/source/debugger/debugger_l0_base.inl"
|
||||||
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
struct SKLFamily;
|
||||||
|
using GfxFamily = SKLFamily;
|
||||||
|
|
||||||
|
static auto coreFamily = IGFX_GEN9_CORE;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||||
|
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||||
|
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||||
|
}
|
||||||
|
template class DebuggerL0Hw<GfxFamily>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Intel Corporation
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/gen9/hw_cmds.h"
|
#include "shared/source/gen9/hw_cmds.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/populate_factory.h"
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
@@ -27,6 +28,7 @@ struct EnableCoreGen9 {
|
|||||||
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||||
|
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
24
shared/source/xe_hp_core/debugger_xe_hp_core.cpp
Normal file
24
shared/source/xe_hp_core/debugger_xe_hp_core.cpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.inl"
|
||||||
|
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
|
||||||
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
|
||||||
|
using GfxFamily = NEO::XeHpFamily;
|
||||||
|
static auto coreFamily = IGFX_XE_HP_CORE;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||||
|
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||||
|
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||||
|
}
|
||||||
|
template class DebuggerL0Hw<GfxFamily>;
|
||||||
|
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/populate_factory.h"
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
#include "shared/source/xe_hp_core/hw_cmds.h"
|
#include "shared/source/xe_hp_core/hw_cmds.h"
|
||||||
@@ -25,6 +26,7 @@ struct EnableCoreXeHpCore {
|
|||||||
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||||
|
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
24
shared/source/xe_hpc_core/debugger_xe_hpc_core.cpp
Normal file
24
shared/source/xe_hpc_core/debugger_xe_hpc_core.cpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.inl"
|
||||||
|
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
|
||||||
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
|
||||||
|
using Family = NEO::XE_HPC_COREFamily;
|
||||||
|
|
||||||
|
static auto coreFamily = IGFX_XE_HPC_CORE;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void populateFactoryTable<DebuggerL0Hw<Family>>() {
|
||||||
|
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||||
|
debuggerL0Factory[coreFamily] = DebuggerL0Hw<Family>::allocate;
|
||||||
|
}
|
||||||
|
template class DebuggerL0Hw<Family>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/populate_factory.h"
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
#include "shared/source/xe_hpc_core/hw_cmds.h"
|
#include "shared/source/xe_hpc_core/hw_cmds.h"
|
||||||
@@ -25,6 +26,7 @@ struct EnableCoreXeHpcCore {
|
|||||||
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||||
|
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
24
shared/source/xe_hpg_core/debugger_xe_hpg_core.cpp
Normal file
24
shared/source/xe_hpg_core/debugger_xe_hpg_core.cpp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debugger/debugger_l0.inl"
|
||||||
|
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
|
||||||
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
|
|
||||||
|
namespace NEO {
|
||||||
|
|
||||||
|
using GfxFamily = NEO::XE_HPG_COREFamily;
|
||||||
|
|
||||||
|
static auto coreFamily = IGFX_XE_HPG_CORE;
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void populateFactoryTable<DebuggerL0Hw<GfxFamily>>() {
|
||||||
|
extern DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE];
|
||||||
|
debuggerL0Factory[coreFamily] = DebuggerL0Hw<GfxFamily>::allocate;
|
||||||
|
}
|
||||||
|
template class DebuggerL0Hw<GfxFamily>;
|
||||||
|
} // namespace NEO
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/command_stream_receiver_hw.h"
|
||||||
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
||||||
|
#include "shared/source/debugger/debugger_l0.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/populate_factory.h"
|
#include "shared/source/helpers/populate_factory.h"
|
||||||
#include "shared/source/xe_hpg_core/hw_cmds.h"
|
#include "shared/source/xe_hpg_core/hw_cmds.h"
|
||||||
@@ -25,6 +26,7 @@ struct EnableCoreXeHpgCore {
|
|||||||
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
populateFactoryTable<CommandStreamReceiverHw<Family>>();
|
||||||
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
|
||||||
|
populateFactoryTable<DebuggerL0Hw<Family>>();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user