Refactor debugger code

- helper sets all SbaAddresses for debugger in
EncodeStateBaseAddress<GfxFamily>::setSbaAddressesForDebugger()
- change DebuggerL0::captureStateBaseAddress() to take
LinearStream
- move getSbaTrackingCommandsSize() to Debugger class

Related-To: NEO-6845

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-04-20 14:12:20 +00:00
committed by Compute-Runtime-Automation
parent f3bcbfb305
commit 5911515ed0
23 changed files with 104 additions and 47 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -15,6 +15,9 @@ class MockDebugger : public Debugger {
public:
MockDebugger() = default;
~MockDebugger() = default;
void captureStateBaseAddress(CommandContainer &container, SbaAddresses sba){};
void captureStateBaseAddress(NEO::LinearStream &cmdStream, SbaAddresses sba) override{};
size_t getSbaTrackingCommandsSize(size_t trackedAddressCount) override {
return 0;
}
};
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -87,6 +87,10 @@ class MockSourceLevelDebugger : public SourceLevelDebugger {
return initializeResult;
}
size_t getSbaTrackingCommandsSize(size_t trackedAddressCount) override {
return sbaTrackingSize;
}
mutable uint32_t initializeCalled = 0u;
bool initializeResult = false;
@@ -98,6 +102,8 @@ class MockSourceLevelDebugger : public SourceLevelDebugger {
bool callBaseNotifyKernelDebugData = false;
bool callBaseNotifyNewDevice = false;
bool callBaseInitialize = false;
size_t sbaTrackingSize = 0;
};
class MockActiveSourceLevelDebugger : public SourceLevelDebugger {