L0Debug fixes for multi tile devices

- notify module allocation for (sub)device used to create module,
makeResident called within (sub)device contexts
- access ISA with vmHandle specific to device index

Related-To: NEO-5784

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-08-30 18:06:04 +00:00
committed by Compute-Runtime-Automation
parent 9f2cfc6f9d
commit ee8af85341
9 changed files with 80 additions and 9 deletions

View File

@ -136,7 +136,7 @@ void DebuggerL0::captureStateBaseAddress(NEO::LinearStream &cmdStream, SbaAddres
}
}
void DebuggerL0::notifyModuleLoadAllocations(const StackVec<NEO::GraphicsAllocation *, 32> &allocs) {
void DebuggerL0::notifyModuleLoadAllocations(Device *device, const StackVec<NEO::GraphicsAllocation *, 32> &allocs) {
NEO::MemoryOperationsHandler *memoryOperationsIface = device->getRootDeviceEnvironment().memoryOperationsInterface.get();
if (memoryOperationsIface) {
for (auto gfxAlloc : allocs) {

View File

@ -94,7 +94,7 @@ class DebuggerL0 : public NEO::Debugger, NEO::NonCopyableOrMovableClass {
MOCKABLE_VIRTUAL void registerElf(NEO::DebugData *debugData, NEO::GraphicsAllocation *isaAllocation);
MOCKABLE_VIRTUAL void notifyCommandQueueCreated(NEO::Device *device);
MOCKABLE_VIRTUAL void notifyCommandQueueDestroyed(NEO::Device *device);
MOCKABLE_VIRTUAL void notifyModuleLoadAllocations(const StackVec<NEO::GraphicsAllocation *, 32> &allocs);
MOCKABLE_VIRTUAL void notifyModuleLoadAllocations(Device *device, const StackVec<NEO::GraphicsAllocation *, 32> &allocs);
MOCKABLE_VIRTUAL void notifyModuleCreate(void *module, uint32_t moduleSize, uint64_t moduleLoadAddress);
MOCKABLE_VIRTUAL void notifyModuleDestroy(uint64_t moduleLoadAddress);
MOCKABLE_VIRTUAL void registerAllocationType(GraphicsAllocation *allocation);

View File

@ -106,6 +106,11 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
NEO::DebuggerL0Hw<GfxFamily>::notifyModuleDestroy(moduleLoadAddress);
}
void notifyModuleLoadAllocations(NEO::Device *device, const StackVec<NEO::GraphicsAllocation *, 32> &allocs) override {
notifyModuleLoadAllocationsCapturedDevice = device;
NEO::DebuggerL0Hw<GfxFamily>::notifyModuleLoadAllocations(device, allocs);
}
uint32_t captureStateBaseAddressCount = 0;
uint32_t programSbaTrackingCommandsCount = 0;
uint32_t getSbaTrackingCommandsSizeCount = 0;
@ -120,6 +125,7 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
uint32_t segmentCountWithAttachedModuleHandle = 0;
uint32_t removedZebinModuleHandle = 0;
uint32_t moduleHandleToReturn = std::numeric_limits<uint32_t>::max();
NEO::Device *notifyModuleLoadAllocationsCapturedDevice = nullptr;
};
template <>

View File

@ -218,7 +218,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggerWithoutMemoryOperationsHandlerWhenNotifyin
MemoryPool::System4KBPages, MemoryManager::maxOsContextCount);
allocs.push_back(&alloc);
debugger->notifyModuleLoadAllocations(allocs);
debugger->notifyModuleLoadAllocations(pDevice, allocs);
}
HWTEST_F(L0DebuggerTest, givenDebuggerWhenCreatedThenModuleHeapDebugAreaIsCreated) {