mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Source Level Debugger - add MI_LOAD_REG debug cmds
- add 2 MI_LOAD_REGISTER_IMM cmds in preamble when debugger is active Change-Id: I4dd46a3c01fc95feadf8a12728ce801efe506e05
This commit is contained in:

committed by
sys_ocldev

parent
079f94cd2d
commit
87f0dcda36
@ -57,3 +57,17 @@ GEN9TEST_F(PreambleTestGen9, givenMidThreadPreemptionAndDisabledDebuggingWhenPre
|
||||
GEN9TEST_F(PreambleTestGen9, givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) {
|
||||
SourceLevelDebuggerPreambleTest<FamilyType>::givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest();
|
||||
}
|
||||
|
||||
GEN9TEST_F(PreambleTestGen9, givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAndStateSipAreInlcuded) {
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::create<MockDevice>(nullptr));
|
||||
|
||||
mockDevice->setSourceLevelDebuggerActive(false);
|
||||
size_t withoutDebugging = PreambleHelper<FamilyType>::getAdditionalCommandsSize(*mockDevice);
|
||||
mockDevice->setSourceLevelDebuggerActive(true);
|
||||
size_t withDebugging = PreambleHelper<FamilyType>::getAdditionalCommandsSize(*mockDevice);
|
||||
EXPECT_LT(withoutDebugging, withDebugging);
|
||||
|
||||
size_t diff = withDebugging - withoutDebugging;
|
||||
size_t sizeExpected = sizeof(typename FamilyType::STATE_SIP) + 2 * sizeof(typename FamilyType::MI_LOAD_REGISTER_IMM);
|
||||
EXPECT_EQ(sizeExpected, diff);
|
||||
}
|
||||
|
Reference in New Issue
Block a user