L0Debug - Notify cmdQueue create for subdevices

- PROCESS ENTRY triggered for first cmdQ created

Related-To: NEO-5784
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-07-22 12:07:36 +00:00
committed by Compute-Runtime-Automation
parent 92f3fe1306
commit 4da6f65d1a
16 changed files with 251 additions and 49 deletions

View File

@@ -337,7 +337,7 @@ class DrmMockResources : public DrmMock {
return bindAvailable;
}
uint32_t notifyFirstCommandQueueCreated() override {
uint32_t notifyFirstCommandQueueCreated(const void *data, size_t size) override {
ioctlCallsCount++;
return 4;
}

View File

@@ -37,6 +37,7 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
using NEO::DebuggerL0::perContextSbaAllocations;
using NEO::DebuggerL0::sbaTrackingGpuVa;
using NEO::DebuggerL0::singleAddressSpaceSbaTracking;
using NEO::DebuggerL0::uuidL0CommandQueueHandle;
MockDebuggerL0Hw(NEO::Device *device) : NEO::DebuggerL0Hw<GfxFamily>(device) {}
~MockDebuggerL0Hw() override = default;
@@ -80,14 +81,14 @@ class MockDebuggerL0Hw : public NEO::DebuggerL0Hw<GfxFamily> {
return NEO::DebuggerL0Hw<GfxFamily>::removeZebinModule(moduleHandle);
}
void notifyCommandQueueCreated() override {
void notifyCommandQueueCreated(NEO::Device *device) override {
commandQueueCreatedCount++;
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated();
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueCreated(device);
}
void notifyCommandQueueDestroyed() override {
void notifyCommandQueueDestroyed(NEO::Device *device) override {
commandQueueDestroyedCount++;
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed();
NEO::DebuggerL0Hw<GfxFamily>::notifyCommandQueueDestroyed(device);
}
void registerAllocationType(NEO::GraphicsAllocation *allocation) override {

View File

@@ -143,7 +143,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenNotifyFirstCommandQueueCreatedCalledThenC
DrmQueryMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
auto handle = drm.context.uuidHandle;
auto registeredHandle = drm.notifyFirstCommandQueueCreated();
auto registeredHandle = drm.notifyFirstCommandQueueCreated(nullptr, 0);
EXPECT_EQ(handle + 1, drm.context.uuidHandle);
EXPECT_EQ(handle, registeredHandle);
@@ -151,8 +151,7 @@ TEST_F(DrmDebugPrelimTest, GivenDrmWhenNotifyFirstCommandQueueCreatedCalledThenC
const auto &receivedUuid = drm.context.receivedRegisterUuid;
ASSERT_TRUE(receivedUuid);
EXPECT_EQ(DrmPrelimHelper::getStringUuidClass(), receivedUuid->uuidClass);
EXPECT_EQ(receivedUuid->size, strlen(uuidL0CommandQueueName));
EXPECT_EQ(0, memcmp(reinterpret_cast<const char *>(receivedUuid->ptr), uuidL0CommandQueueName, receivedUuid->size));
EXPECT_EQ(receivedUuid->size, 0u);
EXPECT_EQ(0, memcmp(receivedUuid->uuid, uuidL0CommandQueueHash, sizeof(receivedUuid->uuid)));
}

View File

@@ -67,7 +67,7 @@ TEST_F(DrmDebugTest, whenNotifyCommandQueueCreateDestroyAreCalledThenImplementat
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
drmMock.ioctlCallsCount = 0;
auto handle = drmMock.notifyFirstCommandQueueCreated();
auto handle = drmMock.notifyFirstCommandQueueCreated(nullptr, 0);
EXPECT_EQ(0u, handle);
EXPECT_EQ(0u, drmMock.ioctlCallsCount);