mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
Pass info about system routine in module debug area
Resolves: NEO-6097 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1d1a8473aa
commit
c96c1b045a
@@ -137,5 +137,33 @@ TEST(RootDebugSession, givenAllSlicesWhenGettingSingleThreadsThenCorrectThreadsA
|
||||
}
|
||||
}
|
||||
|
||||
TEST(RootDebugSession, givenBindlessSystemRoutineWhenQueryingIsBindlessThenTrueReturned) {
|
||||
zet_debug_config_t config = {};
|
||||
config.pid = 0x1234;
|
||||
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
|
||||
Mock<L0::DeviceImp> deviceImp(neoDevice, neoDevice->getExecutionEnvironment());
|
||||
auto debugSession = std::make_unique<DebugSessionMock>(config, &deviceImp);
|
||||
|
||||
debugSession->debugArea.reserved1 = 1u;
|
||||
|
||||
EXPECT_TRUE(debugSession->isBindlessSystemRoutine());
|
||||
}
|
||||
|
||||
TEST(RootDebugSession, givenBindfulSystemRoutineWhenQueryingIsBindlessThenFalseReturned) {
|
||||
zet_debug_config_t config = {};
|
||||
config.pid = 0x1234;
|
||||
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
NEO::Device *neoDevice(NEO::MockDevice::createWithNewExecutionEnvironment<NEO::MockDevice>(&hwInfo, 0));
|
||||
Mock<L0::DeviceImp> deviceImp(neoDevice, neoDevice->getExecutionEnvironment());
|
||||
auto debugSession = std::make_unique<DebugSessionMock>(config, &deviceImp);
|
||||
|
||||
debugSession->debugArea.reserved1 = 0u;
|
||||
|
||||
EXPECT_FALSE(debugSession->isBindlessSystemRoutine());
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
|
||||
@@ -24,7 +24,9 @@ class OsInterfaceWithDebugAttach : public NEO::OSInterface {
|
||||
};
|
||||
|
||||
struct DebugSessionMock : public L0::RootDebugSession {
|
||||
using L0::RootDebugSession::debugArea;
|
||||
using L0::RootDebugSession::getSingleThreads;
|
||||
using L0::RootDebugSession::isBindlessSystemRoutine;
|
||||
|
||||
DebugSessionMock(const zet_debug_config_t &config, L0::Device *device) : RootDebugSession(config, device), config(config){};
|
||||
bool closeConnection() override { return true; }
|
||||
|
||||
Reference in New Issue
Block a user