mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Initialize debugging in Os before creating debugger
Related-To: NEO-4516 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
326b7f3908
commit
765b6cc2ed
@@ -23,7 +23,10 @@ DebugerL0CreateFn debuggerL0Factory[IGFX_MAX_CORE] = {};
|
||||
|
||||
DebuggerL0::DebuggerL0(NEO::Device *device) : device(device) {
|
||||
isLegacyMode = false;
|
||||
initialize();
|
||||
}
|
||||
|
||||
void DebuggerL0::initialize() {
|
||||
auto &engines = device->getEngines();
|
||||
|
||||
sbaTrackingGpuVa = device->getMemoryManager()->reserveGpuAddress(MemoryConstants::pageSize, device->getRootDeviceIndex());
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace NEO {
|
||||
class Device;
|
||||
class GraphicsAllocation;
|
||||
class LinearStream;
|
||||
class OSInterface;
|
||||
} // namespace NEO
|
||||
|
||||
namespace L0 {
|
||||
@@ -80,8 +81,9 @@ class DebuggerL0 : public NEO::Debugger, NEO::NonCopyableOrMovableClass {
|
||||
sba.SurfaceStateBaseAddress != 0 ||
|
||||
sba.BindlessSurfaceStateBaseAddress != 0;
|
||||
}
|
||||
static void initDebuggingInOs(NEO::OSInterface *osInterface);
|
||||
|
||||
MOCKABLE_VIRTUAL void registerResourceClasses();
|
||||
void initialize();
|
||||
|
||||
NEO::Device *device = nullptr;
|
||||
NEO::GraphicsAllocation *sbaAllocation = nullptr;
|
||||
|
||||
@@ -13,10 +13,9 @@
|
||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
void DebuggerL0::registerResourceClasses() {
|
||||
if (device->getRootDeviceEnvironment().osInterface.get() != nullptr) {
|
||||
auto drm = device->getRootDeviceEnvironment().osInterface->get()->getDrm();
|
||||
void DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) {
|
||||
if (osInterface != nullptr) {
|
||||
auto drm = osInterface->get()->getDrm();
|
||||
drm->registerResourceClasses();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/linux/os_interface.h"
|
||||
|
||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
void DebuggerL0::registerResourceClasses() {
|
||||
void DebuggerL0::initDebuggingInOs(NEO::OSInterface *osInterface) {
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
@@ -5,12 +5,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/os_interface.h"
|
||||
|
||||
#include "level_zero/core/source/debugger/debugger_l0.h"
|
||||
|
||||
namespace L0 {
|
||||
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
||||
initDebuggingInOs(device->getRootDeviceEnvironment().osInterface.get());
|
||||
auto debugger = debuggerL0Factory[device->getHardwareInfo().platform.eRenderCoreFamily](device);
|
||||
debugger->registerResourceClasses();
|
||||
return std::unique_ptr<DebuggerL0>(debugger);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user