Add debug variable to enable source level debugger
- new flag ExperimentalEnableSourceLevelDebugger that allows communication with debugger library Related-To: NEO-6514 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
parent
5a3fd1dc94
commit
6d87dccd03
|
@ -843,3 +843,17 @@ TEST(SourceLevelDebugger, givenDebugVarDumpElfWhenElfFileExistsWhileNotifyingDeb
|
|||
std::remove(fileName.c_str());
|
||||
std::remove(fileName2.c_str());
|
||||
}
|
||||
|
||||
TEST(SourceLevelDebugger, givenDebuggerLibraryAvailableAndExperimentalEnableSourceLevelDebuggerThenDebuggerIsCreated) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebuggerLibraryRestorer restorer;
|
||||
DebuggerLibrary::setDebuggerActive(true);
|
||||
DebuggerLibrary::setLibraryAvailable(true);
|
||||
|
||||
DebugManager.flags.ExperimentalEnableSourceLevelDebugger.set(1);
|
||||
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
auto debugger = std::unique_ptr<Debugger>(Debugger::create(&hwInfo));
|
||||
ASSERT_NE(nullptr, debugger.get());
|
||||
EXPECT_TRUE(debugger->isLegacy());
|
||||
}
|
|
@ -363,4 +363,5 @@ EngineUsageHint = -1
|
|||
AddStatePrefetchCmdToMemoryPrefetchAPI = -1
|
||||
UpdateCrossThreadDataSize = 0
|
||||
ForceBcsEngineIndex = -1
|
||||
ResolveDependenciesViaPipeControls = -1
|
||||
ResolveDependenciesViaPipeControls = -1
|
||||
ExperimentalEnableSourceLevelDebugger = 0
|
|
@ -343,6 +343,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, AddStatePrefetchCmdToMemoryPrefetchAPI, -1, "Add
|
|||
DECLARE_DEBUG_VARIABLE(int32_t, ExperimentalSetWalkerPartitionCount, 0, "Experimental implementation: Set number of COMPUTE_WALKERs for a given Partition Type, 0 - do not set the feature.")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ExperimentalSetWalkerPartitionType, -1, "Experimental implementation: Set COMPUTE_WALKER Partition Type. Valid values for types from 1 to 3")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ExperimentalEnableCustomLocalMemoryAlignment, 0, "Align local memory allocations to a given value. Works only with allocations at least as big as the value. 0: no effect, 2097152: 2 megabytes, 1073741824: 1 gigabyte")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ExperimentalEnableSourceLevelDebugger, false, "Experimentally enable source level debugger.")
|
||||
|
||||
/*DRIVER TOGGLES*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceOCLVersion, 0, "Force specific OpenCL API version")
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
namespace NEO {
|
||||
std::unique_ptr<Debugger> Debugger::create(HardwareInfo *hwInfo) {
|
||||
std::unique_ptr<SourceLevelDebugger> sourceLevelDebugger;
|
||||
if (hwInfo->capabilityTable.debuggerSupported) {
|
||||
if (hwInfo->capabilityTable.debuggerSupported || DebugManager.flags.ExperimentalEnableSourceLevelDebugger.get()) {
|
||||
sourceLevelDebugger.reset(SourceLevelDebugger::create());
|
||||
}
|
||||
if (sourceLevelDebugger) {
|
||||
|
|
Loading…
Reference in New Issue