L0 debugger - reports process ENTER/EXIT events for zeCommandQueues

- PROCESS_ENTRY - triggered by first zeCommandQueueCreate()
- PROCESS_EXIT  - triggered by last zeCommandQueueDestroy()

Resolves: NEO-6503

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
Igor Venevtsev
2022-02-10 11:13:59 +00:00
committed by Compute-Runtime-Automation
parent dbe1779e4b
commit 60d6505932
11 changed files with 105 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -43,7 +43,7 @@ TEST(DrmTest, whenRegisterIsaCookieCalledThenImplementationIsEmpty) {
EXPECT_EQ(0u, drmMock.ioctlCallsCount);
}
TEST(DrmTest, WhenCheckingContextDebugSupportThenNoIoctlIsCalled) {
TEST(DrmTest, whenCheckingContextDebugSupportThenNoIoctlIsCalled) {
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
@ -52,3 +52,16 @@ TEST(DrmTest, WhenCheckingContextDebugSupportThenNoIoctlIsCalled) {
EXPECT_EQ(0u, drmMock.ioctlCallsCount);
}
TEST(DrmTest, whenNotifyCommandQueueCreateDestroyAreCalledThenImplementationsAreEmpty) {
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
auto handle = drmMock.notifyFirstCommandQueueCreated();
EXPECT_EQ(0u, handle);
EXPECT_EQ(0u, drmMock.ioctlCallsCount);
drmMock.notifyLastCommandQueueDestroyed(0);
EXPECT_EQ(0u, drmMock.ioctlCallsCount);
}