mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 07:00:17 +08:00
Add support for AUB subcapture (filter and toggle modes)
This commit adds a capability to selectively enable/disable AUB capture, i.e. by toggling the registry key from the outside or specifying the filter with a kernel name and/or kernel start index and kernel end index. Change-Id: Ib5d39c21863fbc4a95aa73c949b9779ff993de0f
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "runtime/event/event.h"
|
||||
#include "runtime/command_stream/aub_subcapture.h"
|
||||
#include "runtime/memory_manager/surface.h"
|
||||
#include "unit_tests/fixtures/enqueue_handler_fixture.h"
|
||||
#include "unit_tests/mocks/mock_command_queue.h"
|
||||
@@ -304,3 +305,47 @@ HWTEST_F(EnqueueHandlerTest, givenExternallySynchronizedParentEventWhenRequestin
|
||||
ouputEvent->release();
|
||||
mockCmdQ->release();
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenSubCaptureIsOffThenActivateSubCaptureIsNotCalled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Off));
|
||||
|
||||
MockKernelWithInternals kernelInternals(*pDevice, context);
|
||||
Kernel *kernel = kernelInternals.mockKernel;
|
||||
MockMultiDispatchInfo multiDispatchInfo(kernel);
|
||||
|
||||
auto mockCmdQ = new MockCommandQueueHw<FamilyType>(context, pDevice, 0);
|
||||
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_NDRANGE_KERNEL>(nullptr,
|
||||
0,
|
||||
false,
|
||||
multiDispatchInfo,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr);
|
||||
EXPECT_FALSE(pDevice->getUltCommandStreamReceiver<FamilyType>().activateAubSubCaptureCalled);
|
||||
|
||||
mockCmdQ->release();
|
||||
}
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenSubCaptureIsOnThenActivateSubCaptureIsCalled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
|
||||
MockKernelWithInternals kernelInternals(*pDevice, context);
|
||||
Kernel *kernel = kernelInternals.mockKernel;
|
||||
MockMultiDispatchInfo multiDispatchInfo(kernel);
|
||||
|
||||
auto mockCmdQ = new MockCommandQueueHw<FamilyType>(context, pDevice, 0);
|
||||
|
||||
mockCmdQ->template enqueueHandler<CL_COMMAND_NDRANGE_KERNEL>(nullptr,
|
||||
0,
|
||||
false,
|
||||
multiDispatchInfo,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr);
|
||||
EXPECT_TRUE(pDevice->getUltCommandStreamReceiver<FamilyType>().activateAubSubCaptureCalled);
|
||||
|
||||
mockCmdQ->release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user