Revert "Move DebuggerL0 to shared"

This reverts commit 7eba4db2e7.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-06-22 04:04:36 +02:00
committed by Compute-Runtime-Automation
parent 8627340ee0
commit c45ddab1c3
54 changed files with 183 additions and 154 deletions

View File

@@ -237,7 +237,6 @@ if(BUILD_WITH_L0)
if(WIN32)
target_sources(${TARGET_NAME_L0}
PRIVATE
${NEO_SHARED_DIRECTORY}/dll/windows/debugger_l0_windows.cpp
${NEO_SHARED_DIRECTORY}/dll/windows/environment_variables.cpp
${NEO_SHARED_DIRECTORY}/dll/windows/options_windows.cpp
${NEO_SHARED_DIRECTORY}/dll/windows/os_interface.cpp
@@ -263,7 +262,6 @@ if(BUILD_WITH_L0)
${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/devices_base.inl
${NEO_SHARED_DIRECTORY}/dll/linux/debugger_l0_linux.cpp
${NEO_SHARED_DIRECTORY}/dll/linux/drm_neo_create.cpp
${NEO_SHARED_DIRECTORY}/dll/linux/options_linux.cpp
${NEO_SHARED_DIRECTORY}/dll/linux/os_interface.cpp
@@ -376,6 +374,7 @@ if(BUILD_WITH_L0)
L0_SOURCES_WINDOWS
L0_SRCS_CACHE_RESERVATION
L0_SRCS_COMPILER_INTERFACE
L0_SRCS_DEBUGGER
L0_SRCS_DRIVER
L0_SRCS_OCLOC_SHARED
)

View File

@@ -0,0 +1,17 @@
#
# 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})

View File

@@ -5,7 +5,7 @@
*
*/
#include "shared/source/debugger/debugger_l0.h"
#include "level_zero/core/source/debugger/debugger_l0.h"
#include "shared/source/command_container/cmdcontainer.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
@@ -18,7 +18,7 @@
#include <cstring>
namespace NEO {
namespace L0 {
DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE] = {};
@@ -132,4 +132,4 @@ void DebuggerL0::notifyModuleLoadAllocations(const StackVec<NEO::GraphicsAllocat
}
}
}
} // namespace NEO
} // namespace L0

View File

@@ -19,7 +19,9 @@ class Device;
class GraphicsAllocation;
class LinearStream;
class OSInterface;
} // namespace NEO
namespace L0 {
#pragma pack(1)
struct SbaTrackedAddresses {
char magic[8] = "sbaarea";
@@ -154,4 +156,4 @@ struct DebuggerL0PopulateFactory {
}
};
} // namespace NEO
} // namespace L0

View File

@@ -8,12 +8,13 @@
#include "shared/source/command_container/command_encoder.h"
#include "shared/source/command_stream/linear_stream.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 "level_zero/core/source/debugger/debugger_l0.h"
#include "hw_cmds.h"
namespace NEO {
namespace L0 {
template <typename GfxFamily>
void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(NEO::LinearStream &cmdStream, const SbaAddresses &sba) {
@@ -134,4 +135,4 @@ void DebuggerL0Hw<GfxFamily>::programSbaAddressLoad(NEO::LinearStream &cmdStream
true);
}
} // namespace NEO
} // namespace L0

View File

@@ -5,7 +5,7 @@
*
*/
namespace NEO {
namespace L0 {
template <typename GfxFamily>
size_t DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(size_t trackedAddressCount) {
if (singleAddressSpaceSbaTracking) {
@@ -19,4 +19,4 @@ template <typename GfxFamily>
void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::LinearStream &cmdStream, const SbaAddresses &sba) {
UNRECOVERABLE_IF(true);
}
} // namespace NEO
} // namespace L0

View File

@@ -5,7 +5,7 @@
*
*/
namespace NEO {
namespace L0 {
template <typename GfxFamily>
size_t DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(size_t trackedAddressCount) {
if (singleAddressSpaceSbaTracking) {
@@ -64,7 +64,7 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
// Jump to SDI command that is modified
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
const auto nextCommand = ptrOffset(cmdStreamGpuBase, ptrDiff(cmdStream.getSpace(0), cmdStreamCpuBase));
const auto nextCommand = ptrOffset(cmdStreamGpuBase, ptrDiff(reinterpret_cast<uint64_t>(cmdStream.getSpace(0)), cmdStreamCpuBase));
MI_BATCH_BUFFER_START bbCmd = GfxFamily::cmdInitBatchBufferStart;
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
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
const auto addressOfSDI = ptrOffset(cmdStreamGpuBase, ptrDiff(cmdStream.getSpace(0), cmdStreamCpuBase));
const auto addressOfSDI = ptrOffset(cmdStreamGpuBase, ptrDiff(reinterpret_cast<uint64_t>(cmdStream.getSpace(0)), cmdStreamCpuBase));
// Cmd to store value ( SBA address )
auto miStoreSbaField = cmdStream.getSpaceForCmd<MI_STORE_DATA_IMM>();
@@ -141,7 +141,7 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
if (fieldOffsetAndValue.size()) {
auto previousBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
const auto addressOfPreviousBuffer = ptrOffset(cmdStreamGpuBase, ptrDiff(cmdStream.getSpace(0), cmdStreamCpuBase));
const auto addressOfPreviousBuffer = ptrOffset(cmdStreamGpuBase, ptrDiff(reinterpret_cast<uint64_t>(cmdStream.getSpace(0)), cmdStreamCpuBase));
MI_BATCH_BUFFER_START bbCmd = GfxFamily::cmdInitBatchBufferStart;
bbCmd.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT);
@@ -156,4 +156,4 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
}
}
} // namespace NEO
} // namespace L0

View File

@@ -4,9 +4,11 @@
# SPDX-License-Identifier: MIT
#
set(NEO_CORE_SRCS_DEBUGGER_LINUX
set(L0_SRCS_DEBUGGER_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_linux.cpp
)
set_property(GLOBAL PROPERTY NEO_CORE_SRCS_DEBUGGER_LINUX ${NEO_CORE_SRCS_DEBUGGER_LINUX})
if(UNIX)
set_property(GLOBAL PROPERTY L0_SRCS_DEBUGGER_LINUX ${L0_SRCS_DEBUGGER_LINUX})
endif()

View File

@@ -5,14 +5,15 @@
*
*/
#include "shared/source/debugger/debugger_l0.h"
#include "shared/source/device/device.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/kernel/debug_data.h"
#include "shared/source/os_interface/linux/drm_allocation.h"
#include "shared/source/os_interface/linux/drm_neo.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) {
if (osInterface != nullptr) {
auto drm = osInterface->getDriverModel()->as<NEO::Drm>();
@@ -80,4 +81,4 @@ void DebuggerL0::notifyCommandQueueDestroyed() {
}
}
} // namespace NEO
} // namespace L0

View File

@@ -4,9 +4,11 @@
# SPDX-License-Identifier: MIT
#
set(NEO_CORE_SRCS_DEBUGGER_WINDOWS
set(L0_SRCS_DEBUGGER_WINDOWS
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_windows.cpp
)
set_property(GLOBAL PROPERTY NEO_CORE_SRCS_DEBUGGER_WINDOWS ${NEO_CORE_SRCS_DEBUGGER_WINDOWS})
if(WIN32)
set_property(GLOBAL PROPERTY L0_SRCS_DEBUGGER_WINDOWS ${L0_SRCS_DEBUGGER_WINDOWS})
endif()

View File

@@ -5,13 +5,14 @@
*
*/
#include "shared/source/debugger/debugger_l0.h"
#include "shared/source/device/device.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/kernel/debug_data.h"
#include "shared/source/os_interface/windows/wddm/wddm.h"
namespace NEO {
#include "level_zero/core/source/debugger/debugger_l0.h"
namespace L0 {
bool DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) {
if (osInterface == nullptr) {
@@ -45,4 +46,4 @@ void DebuggerL0::notifyCommandQueueCreated() {
void DebuggerL0::notifyCommandQueueDestroyed() {
}
} // namespace NEO
} // namespace L0

View File

@@ -7,8 +7,7 @@
#pragma once
#include "shared/source/debugger/debugger_l0.h"
#include "level_zero/core/source/debugger/debugger_l0.h"
#include <level_zero/ze_api.h>
#include <level_zero/zet_api.h>
@@ -116,10 +115,10 @@ struct Device : _ze_device_handle_t {
virtual NEO::PreemptionMode getDevicePreemptionMode() const = 0;
virtual const NEO::DeviceInfo &getDeviceInfo() const = 0;
NEO::SourceLevelDebugger *getSourceLevelDebugger() { return getNEODevice()->getSourceLevelDebugger(); }
NEO::DebuggerL0 *getL0Debugger() {
DebuggerL0 *getL0Debugger() {
auto debugger = getNEODevice()->getDebugger();
if (debugger) {
return !debugger->isLegacy() ? static_cast<NEO::DebuggerL0 *>(debugger) : nullptr;
return !debugger->isLegacy() ? static_cast<DebuggerL0 *>(debugger) : nullptr;
}
return nullptr;
}

View File

@@ -6,6 +6,7 @@
set(L0_SRCS_DLL_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/debugger_l0_linux.cpp
)
if(NEO_ENABLE_i915_PRELIM_DETECTION)

View File

@@ -5,12 +5,13 @@
*
*/
#include "shared/source/debugger/debugger_l0.h"
#include "shared/source/device/device.h"
#include "shared/source/os_interface/linux/drm_neo.h"
#include "shared/source/os_interface/os_interface.h"
namespace NEO {
#include "level_zero/core/source/debugger/debugger_l0.h"
namespace L0 {
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
auto &hwInfo = device->getHardwareInfo();
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
@@ -24,4 +25,4 @@ std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
return std::unique_ptr<DebuggerL0>(nullptr);
}
} // namespace NEO
} // namespace L0

View File

@@ -6,6 +6,7 @@
set(L0_SRCS_DLL_WINDOWS
${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
)

View File

@@ -5,9 +5,9 @@
*
*/
#include "shared/source/debugger/debugger_l0.h"
#include "level_zero/core/source/debugger/debugger_l0.h"
namespace NEO {
namespace L0 {
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
auto &hwInfo = device->getHardwareInfo();
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
@@ -20,4 +20,4 @@ std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
}
return std::unique_ptr<DebuggerL0>(nullptr);
}
} // namespace NEO
} // namespace L0

View File

@@ -8,7 +8,6 @@
#include "level_zero/core/source/driver/driver_handle_imp.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/helpers/string.h"
#include "shared/source/memory_manager/memory_manager.h"
@@ -16,6 +15,7 @@
#include "shared/source/os_interface/os_library.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/driver/driver_imp.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.ftrRenderCompressedImages = false;
rootDeviceEnvironment->debugger = NEO::DebuggerL0::create(neoDevice.get());
rootDeviceEnvironment->debugger = DebuggerL0::create(neoDevice.get());
}
}

View File

@@ -9,6 +9,7 @@ if(SUPPORT_GEN11)
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.cpp
${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}/l0_hw_helper_gen11.cpp
)

View File

@@ -5,13 +5,15 @@
*
*/
#include "shared/source/debugger/debugger_l0.inl"
#include "shared/source/debugger/debugger_l0_base.inl"
#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 NEO
} // namespace L0

View File

@@ -9,6 +9,7 @@ if(SUPPORT_GEN12LP)
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen12lp.cpp
${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}/enable_family_full_l0_gen12lp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/l0_hw_helper_gen12lp.cpp

View File

@@ -5,12 +5,13 @@
*
*/
#include "shared/source/debugger/debugger_l0.inl"
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
namespace NEO {
#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 NEO
} // namespace L0

View File

@@ -7,6 +7,7 @@
if(SUPPORT_GEN8)
set(HW_SOURCES_GEN8
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/debugger_gen8.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen8.cpp
)

View File

@@ -5,13 +5,16 @@
*
*/
#include "shared/source/debugger/debugger_l0.inl"
#include "shared/source/debugger/debugger_l0_base.inl"
#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;
template class DebuggerL0Hw<NEO::GfxFamily>;
} // namespace NEO
namespace L0 {
template class DebuggerL0Hw<NEO::GfxFamily>;
} // namespace L0

View File

@@ -9,6 +9,7 @@ if(SUPPORT_GEN9)
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.cpp
${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}/l0_hw_helper_gen9.cpp
)

View File

@@ -5,13 +5,16 @@
*
*/
#include "shared/source/debugger/debugger_l0.inl"
#include "shared/source/debugger/debugger_l0_base.inl"
#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 NEO
} // namespace L0

View File

@@ -7,7 +7,6 @@
#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/blit_commands_helper.h"
#include "shared/source/helpers/hw_info.h"
@@ -27,6 +26,7 @@
#include "shared/source/program/kernel_info.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_imp.h"
#include "level_zero/core/source/driver/driver_handle_imp.h"

View File

@@ -9,6 +9,7 @@ if(SUPPORT_XE_HP_CORE)
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hp_core.cpp
${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}/sampler_xe_hp_core.inl
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hp_core.cpp

View File

@@ -5,9 +5,9 @@
*
*/
#include "shared/source/debugger/debugger_l0.inl"
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
namespace NEO {
#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;
@@ -15,4 +15,4 @@ DebuggerL0PopulateFactory<IGFX_XE_HP_CORE, Family> debuggerXE_HP_CORE;
template class DebuggerL0Hw<Family>;
} // namespace NEO
} // namespace L0

View File

@@ -9,6 +9,7 @@ if(SUPPORT_XE_HPC_CORE)
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpc_core.cpp
${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}/l0_hw_helper_xe_hpc_core.cpp
)

View File

@@ -5,12 +5,12 @@
*
*/
#include "shared/source/debugger/debugger_l0.inl"
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
namespace NEO {
#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 NEO
} // namespace L0

View File

@@ -9,6 +9,7 @@ if(SUPPORT_XE_HPG_CORE)
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_xe_hpg_core.cpp
${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}/sampler_xe_hpg_core.inl
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_xe_hpg_core.cpp

View File

@@ -5,12 +5,12 @@
*
*/
#include "shared/source/debugger/debugger_l0.inl"
#include "shared/source/debugger/debugger_l0_tgllp_and_later.inl"
namespace NEO {
#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 NEO
} // namespace L0

View File

@@ -133,16 +133,16 @@ HWTEST2_F(DebuggerSingleAddressSpaceAub, GivenSingleAddressSpaceWhenCmdListIsExe
auto dynamicStateBaseAddress = commandList->commandContainer.getIndirectHeap(HeapType::DYNAMIC_STATE)->getGraphicsAllocation()->getGpuAddress();
auto surfaceStateBaseAddress = commandList->commandContainer.getIndirectHeap(HeapType::SURFACE_STATE)->getGraphicsAllocation()->getGpuAddress();
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, SurfaceStateBaseAddress)),
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, SurfaceStateBaseAddress)),
&surfaceStateBaseAddress, sizeof(surfaceStateBaseAddress));
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, DynamicStateBaseAddress)),
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, DynamicStateBaseAddress)),
&dynamicStateBaseAddress, sizeof(dynamicStateBaseAddress));
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, InstructionBaseAddress)),
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, InstructionBaseAddress)),
&instructionHeapBaseAddress, sizeof(instructionHeapBaseAddress));
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(NEO::SbaTrackedAddresses, BindlessSurfaceStateBaseAddress)),
expectMemory<FamilyType>(reinterpret_cast<void *>(sbaAddress + offsetof(SbaTrackedAddresses, BindlessSurfaceStateBaseAddress)),
&surfaceStateBaseAddress, sizeof(surfaceStateBaseAddress));
EXPECT_EQ(ZE_RESULT_SUCCESS, zeKernelDestroy(kernel));

View File

@@ -11,7 +11,6 @@ namespace NEO {
struct TGLLPFamily;
using GfxFamily = TGLLPFamily;
} // namespace NEO
namespace L0 {

View File

@@ -8,6 +8,7 @@
#include "level_zero/core/test/unit_tests/mocks/mock_l0_debugger.h"
namespace NEO {
struct SKLFamily;
using GfxFamily = SKLFamily;
} // namespace NEO

View File

@@ -9,14 +9,17 @@
#include "level_zero/core/test/unit_tests/mocks/mock_l0_debugger.h"
NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[IGFX_MAX_CORE];
namespace L0 {
namespace ult {
DebugerL0CreateFn mockDebuggerL0HwFactory[IGFX_MAX_CORE];
}
} // namespace L0
namespace NEO {
std::unique_ptr<Debugger> DebuggerL0::create(NEO::Device *device) {
namespace L0 {
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
initDebuggingInOs(device->getRootDeviceEnvironment().osInterface.get());
auto debugger = mockDebuggerL0HwFactory[device->getHardwareInfo().platform.eRenderCoreFamily](device);
auto debugger = ult::mockDebuggerL0HwFactory[device->getHardwareInfo().platform.eRenderCoreFamily](device);
return std::unique_ptr<DebuggerL0>(debugger);
}
} // namespace NEO
} // namespace L0

View File

@@ -6,50 +6,48 @@
*/
#pragma once
#include "shared/source/debugger/debugger_l0.h"
#include "shared/source/kernel/debug_data.h"
extern NEO::DebugerL0CreateFn mockDebuggerL0HwFactory[];
#include "level_zero/core/source/debugger/debugger_l0.h"
#include "level_zero/core/test/unit_tests/white_box.h"
namespace L0 {
namespace ult {
template <class BaseClass>
struct WhiteBox;
extern DebugerL0CreateFn mockDebuggerL0HwFactory[];
template <typename GfxFamily>
class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
class MockDebuggerL0Hw : public L0::DebuggerL0Hw<GfxFamily> {
public:
using NEO::DebuggerL0::perContextSbaAllocations;
using NEO::DebuggerL0::sbaTrackingGpuVa;
using NEO::DebuggerL0::singleAddressSpaceSbaTracking;
using L0::DebuggerL0::perContextSbaAllocations;
using L0::DebuggerL0::sbaTrackingGpuVa;
using L0::DebuggerL0::singleAddressSpaceSbaTracking;
MockDebuggerL0Hw(NEO::Device *device) : NEO::DebuggerL0Hw<GfxFamily>(device) {}
MockDebuggerL0Hw(NEO::Device *device) : L0::DebuggerL0Hw<GfxFamily>(device) {}
~MockDebuggerL0Hw() override = default;
static NEO::DebuggerL0 *allocate(NEO::Device *device) {
static DebuggerL0 *allocate(NEO::Device *device) {
return new MockDebuggerL0Hw<GfxFamily>(device);
}
void captureStateBaseAddress(NEO::LinearStream &cmdStream, NEO::Debugger::SbaAddresses sba) override {
captureStateBaseAddressCount++;
NEO::DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(cmdStream, sba);
L0::DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(cmdStream, sba);
}
size_t getSbaTrackingCommandsSize(size_t trackedAddressCount) override {
getSbaTrackingCommandsSizeCount++;
return NEO::DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(trackedAddressCount);
return L0::DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(trackedAddressCount);
}
void programSbaTrackingCommands(NEO::LinearStream &cmdStream, const NEO::Debugger::SbaAddresses &sba) override {
programSbaTrackingCommandsCount++;
NEO::DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(cmdStream, sba);
L0::DebuggerL0Hw<GfxFamily>::programSbaTrackingCommands(cmdStream, sba);
}
void registerElf(NEO::DebugData *debugData, NEO::GraphicsAllocation *isaAllocation) override {
registerElfCount++;
lastReceivedElf = debugData->vIsa;
NEO::DebuggerL0Hw<GfxFamily>::registerElf(debugData, isaAllocation);
L0::DebuggerL0Hw<GfxFamily>::registerElf(debugData, isaAllocation);
}
bool attachZebinModuleToSegmentAllocations(const StackVec<NEO::GraphicsAllocation *, 32> &allocs, uint32_t &moduleHandle) override {
@@ -58,22 +56,22 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
moduleHandle = moduleHandleToReturn;
return true;
}
return NEO::DebuggerL0Hw<GfxFamily>::attachZebinModuleToSegmentAllocations(allocs, moduleHandle);
return L0::DebuggerL0Hw<GfxFamily>::attachZebinModuleToSegmentAllocations(allocs, moduleHandle);
}
bool removeZebinModule(uint32_t moduleHandle) override {
removedZebinModuleHandle = moduleHandle;
return NEO::DebuggerL0Hw<GfxFamily>::removeZebinModule(moduleHandle);
return L0::DebuggerL0Hw<GfxFamily>::removeZebinModule(moduleHandle);
}
void notifyCommandQueueCreated() override {
commandQueueCreatedCount++;
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated();
L0::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated();
}
void notifyCommandQueueDestroyed() override {
commandQueueDestroyedCount++;
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed();
L0::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed();
}
uint32_t captureStateBaseAddressCount = 0;
@@ -89,17 +87,18 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
uint32_t moduleHandleToReturn = std::numeric_limits<uint32_t>::max();
};
template <>
struct WhiteBox<NEO::DebuggerL0> : public NEO::DebuggerL0 {
using BaseClass = NEO::DebuggerL0;
using BaseClass::initDebuggingInOs;
};
template <uint32_t productFamily, typename GfxFamily>
struct MockDebuggerL0HwPopulateFactory {
MockDebuggerL0HwPopulateFactory() {
mockDebuggerL0HwFactory[productFamily] = L0::ult::MockDebuggerL0Hw<GfxFamily>::allocate;
mockDebuggerL0HwFactory[productFamily] = MockDebuggerL0Hw<GfxFamily>::allocate;
}
};
template <>
struct WhiteBox<::L0::DebuggerL0> : public ::L0::DebuggerL0 {
using BaseClass = ::L0::DebuggerL0;
using BaseClass::initDebuggingInOs;
};
} // namespace ult
} // namespace L0

View File

@@ -94,7 +94,7 @@ TEST(L0DebuggerLinux, givenVmBindAndPerContextVmEnabledInDrmWhenInitializingDebu
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
auto result = WhiteBox<NEO::DebuggerL0>::initDebuggingInOs(osInterface);
auto result = WhiteBox<::L0::DebuggerL0>::initDebuggingInOs(osInterface);
EXPECT_TRUE(result);
EXPECT_TRUE(drmMock->registerClassesCalled);
}
@@ -116,7 +116,7 @@ TEST(L0DebuggerLinux, givenVmBindNotAvailableInDrmWhenInitializingDebuggingInOsT
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
auto result = WhiteBox<NEO::DebuggerL0>::initDebuggingInOs(osInterface);
auto result = WhiteBox<::L0::DebuggerL0>::initDebuggingInOs(osInterface);
EXPECT_FALSE(result);
EXPECT_FALSE(drmMock->registerClassesCalled);
}
@@ -138,7 +138,7 @@ TEST(L0DebuggerLinux, givenPerContextVmNotEnabledWhenInitializingDebuggingInOsTh
executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(osInterface);
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drmMock));
auto result = WhiteBox<NEO::DebuggerL0>::initDebuggingInOs(osInterface);
auto result = WhiteBox<::L0::DebuggerL0>::initDebuggingInOs(osInterface);
EXPECT_FALSE(result);
EXPECT_FALSE(drmMock->registerClassesCalled);
}

View File

@@ -60,7 +60,7 @@ HWTEST_P(L0DebuggerParameterizedTests, givenL0DebuggerWhenCreatedThenPerContextS
}
std::vector<NEO::GraphicsAllocation *> allocations;
auto &allEngines = neoDevice->getMemoryManager()->getRegisteredEngines();
auto &allEngines = device->getNEODevice()->getMemoryManager()->getRegisteredEngines();
for (auto &engine : allEngines) {
auto sbaAllocation = debugger->getSbaTrackingBuffer(engine.osContext->getContextId());
@@ -86,7 +86,7 @@ HWTEST_F(L0DebuggerTest, givenCreatedL0DebuggerThenSbaTrackingBuffersContainVali
auto sbaAllocation = sbaBuffer.second;
ASSERT_NE(nullptr, sbaAllocation);
auto sbaHeader = reinterpret_cast<NEO::SbaTrackedAddresses *>(sbaAllocation->getUnderlyingBuffer());
auto sbaHeader = reinterpret_cast<SbaTrackedAddresses *>(sbaAllocation->getUnderlyingBuffer());
EXPECT_STREQ("sbaarea", sbaHeader->magic);
EXPECT_EQ(0u, sbaHeader->BindlessSamplerStateBaseAddress);
@@ -146,7 +146,7 @@ HWTEST_F(L0DebuggerMultiSubDeviceTest, givenMultiSubDevicesWhenSbaTrackingBuffer
EXPECT_TRUE(storageInfo.tileInstanced);
for (uint32_t i = 0; i < numSubDevices; i++) {
auto sbaHeader = reinterpret_cast<NEO::SbaTrackedAddresses *>(ptrOffset(debugger->perContextSbaAllocations[contextId]->getUnderlyingBuffer(),
auto sbaHeader = reinterpret_cast<SbaTrackedAddresses *>(ptrOffset(debugger->perContextSbaAllocations[contextId]->getUnderlyingBuffer(),
debugger->perContextSbaAllocations[contextId]->getUnderlyingBufferSize() * i));
EXPECT_STREQ("sbaarea", sbaHeader->magic);
@@ -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 >> 32), cmdSdi->getDataDword1());
auto expectedGpuVa = gmmHelper->decanonize(device->getL0Debugger()->getSbaTrackingGpuVa()) + offsetof(NEO::SbaTrackedAddresses, GeneralStateBaseAddress);
auto expectedGpuVa = gmmHelper->decanonize(device->getL0Debugger()->getSbaTrackingGpuVa()) + offsetof(SbaTrackedAddresses, GeneralStateBaseAddress);
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
for (auto i = 0u; i < numCommandLists; i++) {
@@ -415,7 +415,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
auto debugger = std::make_unique<MockDebuggerL0Hw<FamilyType>>(neoDevice);
debugger->singleAddressSpaceSbaTracking = 0;
debugger->sbaTrackingGpuVa.address = 0x45670000;
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, GeneralStateBaseAddress);
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, GeneralStateBaseAddress);
StackVec<char, 4096> buffer(4096);
NEO::LinearStream cmdStream(buffer.begin(), buffer.size());
@@ -452,7 +452,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, SurfaceStateBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, SurfaceStateBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
@@ -461,7 +461,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, DynamicStateBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, DynamicStateBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(dsba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(dsba >> 32), cmdSdi->getDataDword1());
@@ -471,7 +471,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, IndirectObjectBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, IndirectObjectBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(ioba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(ioba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
@@ -480,7 +480,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, InstructionBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, InstructionBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(iba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(iba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
@@ -489,7 +489,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenNonZeroGpuVasWhenProgrammingSbaTrac
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
@@ -501,7 +501,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
auto debugger = std::make_unique<MockDebuggerL0Hw<FamilyType>>(neoDevice);
debugger->sbaTrackingGpuVa.address = 0x45670000;
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, GeneralStateBaseAddress);
auto expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, GeneralStateBaseAddress);
StackVec<char, 4096> buffer(4096);
NEO::LinearStream cmdStream(buffer.begin(), buffer.size());
@@ -538,7 +538,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, SurfaceStateBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, SurfaceStateBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
@@ -548,7 +548,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, DynamicStateBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, DynamicStateBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(dsba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(dsba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
@@ -557,7 +557,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, IndirectObjectBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, IndirectObjectBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(ioba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(ioba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
@@ -566,7 +566,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, InstructionBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, InstructionBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(iba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(iba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());
@@ -575,7 +575,7 @@ HWTEST_F(PerContextAddressSpaceFixture, givenCanonizedGpuVasWhenProgrammingSbaTr
sdiItor++;
cmdSdi = genCmdCast<MI_STORE_DATA_IMM *>(*sdiItor);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(NEO::SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
expectedGpuVa = debugger->sbaTrackingGpuVa.address + offsetof(SbaTrackedAddresses, BindlessSurfaceStateBaseAddress);
EXPECT_EQ(static_cast<uint32_t>(ssba & 0x0000FFFFFFFFULL), cmdSdi->getDataDword0());
EXPECT_EQ(static_cast<uint32_t>(ssba >> 32), cmdSdi->getDataDword1());
EXPECT_EQ(expectedGpuVa, cmdSdi->getAddress());

View File

@@ -5,7 +5,6 @@
*
*/
#include "shared/source/debugger/debugger_l0.h"
#include "shared/source/device_binary_format/patchtokens_decoder.h"
#include "shared/source/helpers/local_memory_access_modes.h"
#include "shared/source/helpers/ray_tracing_helper.h"
@@ -21,6 +20,7 @@
#include "shared/test/unit_test/compiler_interface/linker_mock.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_hw.h"
#include "level_zero/core/source/kernel/kernel_hw.h"

View File

@@ -6,9 +6,9 @@
*/
#pragma once
#include "shared/source/debugger/debugger_l0.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/ze_api.h>
#include <level_zero/zet_api.h>
@@ -104,7 +104,7 @@ struct DebugSession : _zet_debug_session_handle_t {
virtual bool isBindlessSystemRoutine();
virtual bool readModuleDebugArea() = 0;
virtual ze_result_t readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) = 0;
virtual ze_result_t readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) = 0;
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);
NEO::DebugAreaHeader debugArea;
DebugAreaHeader debugArea;
Device *connectedDevice = nullptr;
std::map<uint64_t, std::unique_ptr<EuThread>> allThreads;

View File

@@ -817,7 +817,7 @@ ze_result_t DebugSessionImp::readSbaRegisters(ze_device_thread_t thread, uint32_
ze_result_t ret = ZE_RESULT_SUCCESS;
NEO::SbaTrackedAddresses sbaBuffer;
SbaTrackedAddresses sbaBuffer;
ret = readSbaBuffer(convertToThreadId(thread), sbaBuffer);
if (ret != ZE_RESULT_SUCCESS) {
return ret;

View File

@@ -608,7 +608,7 @@ bool DebugSessionLinux::readModuleDebugArea() {
memset(this->debugArea.magic, 0, sizeof(this->debugArea.magic));
auto retVal = readGpuMemory(vm, reinterpret_cast<char *>(&this->debugArea), sizeof(this->debugArea), gpuVa);
if (retVal != ZE_RESULT_SUCCESS || strncmp(this->debugArea.magic, "dbgarea", sizeof(NEO::DebugAreaHeader::magic)) != 0) {
if (retVal != ZE_RESULT_SUCCESS || strncmp(this->debugArea.magic, "dbgarea", sizeof(DebugAreaHeader::magic)) != 0) {
PRINT_DEBUGGER_ERROR_LOG("Reading Module Debug Area failed, error = %d\n", retVal);
return false;
}
@@ -1444,7 +1444,7 @@ bool DebugSessionLinux::readSystemRoutineIdent(EuThread *thread, uint64_t vmHand
return true;
}
ze_result_t DebugSessionLinux::readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) {
ze_result_t DebugSessionLinux::readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) {
auto vmHandle = allThreads[threadId]->getMemoryHandle();
if (vmHandle == invalidHandle) {

View File

@@ -219,7 +219,7 @@ struct DebugSessionLinux : DebugSessionImp {
uint64_t extractVaFromUuidString(std::string &uuid);
bool readModuleDebugArea() override;
ze_result_t readSbaBuffer(EuThread::ThreadId, NEO::SbaTrackedAddresses &sbaBuffer) override;
ze_result_t readSbaBuffer(EuThread::ThreadId, SbaTrackedAddresses &sbaBuffer) override;
void readStateSaveAreaHeader() override;
void applyResumeWa(std::vector<ze_device_thread_t> threads, uint8_t *bitmask, size_t bitmaskSize);

View File

@@ -280,7 +280,7 @@ bool DebugSessionWindows::readModuleDebugArea() {
return false;
}
ze_result_t DebugSessionWindows::readSbaBuffer(EuThread::ThreadId, NEO::SbaTrackedAddresses &sbaBuffer) {
ze_result_t DebugSessionWindows::readSbaBuffer(EuThread::ThreadId, SbaTrackedAddresses &sbaBuffer) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

View File

@@ -40,7 +40,7 @@ struct DebugSessionWindows : DebugSessionImp {
ze_result_t readGpuMemory(uint64_t memoryHandle, char *output, size_t size, uint64_t gpuVa) override;
ze_result_t writeGpuMemory(uint64_t memoryHandle, const char *input, size_t size, uint64_t gpuVa) override;
ze_result_t readSbaBuffer(EuThread::ThreadId, NEO::SbaTrackedAddresses &sbaBuffer) override;
ze_result_t readSbaBuffer(EuThread::ThreadId, SbaTrackedAddresses &sbaBuffer) override;
MOCKABLE_VIRTUAL ze_result_t readAndHandleEvent(uint64_t timeoutMs);
ze_result_t handleModuleCreateEvent(DBGUMD_READ_EVENT_MODULE_CREATE_EVENT_PARAMS &moduleCreateParams);

View File

@@ -103,7 +103,7 @@ struct MockDebugSession : public L0::DebugSessionImp {
return DebugSessionImp::writeRegistersImp(thread, type, start, count, pRegisterValues);
}
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) override {
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) override {
sbaBuffer = sba;
return readSbaBufferResult;
}
@@ -246,7 +246,7 @@ struct MockDebugSession : public L0::DebugSessionImp {
std::vector<uint32_t> resumedDevices;
std::vector<std::vector<ze_device_thread_t>> resumedThreads;
NEO::SbaTrackedAddresses sba;
SbaTrackedAddresses sba;
uint64_t readMemoryBuffer[64];
uint64_t regs[16];

View File

@@ -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 {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, NEO::SbaTrackedAddresses &sbaBuffer) override {
ze_result_t readSbaBuffer(EuThread::ThreadId threadId, SbaTrackedAddresses &sbaBuffer) override {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
void startAsyncThread() override {

View File

@@ -152,7 +152,6 @@ if(WIN32)
NEO_CORE_OS_INTERFACE_WDDM
NEO_CORE_PAGE_FAULT_MANAGER_WINDOWS
NEO_CORE_SKU_INFO_WINDOWS
NEO_CORE_SRCS_DEBUGGER_WINDOWS
NEO_CORE_SRCS_HELPERS_WINDOWS
NEO_CORE_UTILITIES_WINDOWS
NEO_CORE_EXECUTION_ENVIRONMENT_WDDM
@@ -163,7 +162,6 @@ else()
NEO_CORE_DIRECT_SUBMISSION_LINUX
NEO_CORE_OS_INTERFACE_LINUX
NEO_CORE_PAGE_FAULT_MANAGER_LINUX
NEO_CORE_SRCS_DEBUGGER_LINUX
NEO_CORE_UTILITIES_LINUX
NEO_CORE_EXECUTION_ENVIRONMENT_DRM
NEO_CORE_AIL_LINUX

View File

@@ -8,14 +8,6 @@ set(NEO_CORE_DEBUGGER
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/debugger.cpp
${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})
add_subdirectories()

View File

@@ -18,7 +18,6 @@ set(CORE_RUNTIME_SRCS_COREX_CPP_BASE
command_stream_receiver_hw
command_stream_receiver_simulated_common_hw
create_device_command_stream_receiver
debugger
direct_submission
experimental_command_buffer
implicit_scaling
@@ -130,11 +129,6 @@ macro(macro_for_each_platform)
if(EXISTS ${SRC_FILE})
list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_BASE ${SRC_FILE})
endif()
set(SRC_FILE ${PATH_TO_CORE}debugger_${PLATFORM_IT_LOWER}.cpp)
if(EXISTS ${SRC_FILE})
list(APPEND CORE_SRCS_${CORE_TYPE}_CPP_BASE ${SRC_FILE})
endif()
endforeach()
endforeach()