mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
refactor: Remove SourceLevelDebugger
Removed: - SourceLevelDebugger (with tests) - DebuggerLibrary - DebuggerLibraryRestore - debuggerSupported field from hwInfo.capabilityTable - HasSourceLevelDebuggerSupport matcher - ExperimentalEnableSourceLevelDebugger debug var - EnableMockSourceLevelDebugger debug var - DebuggerOptDisable debug var - lib_names.h.in file - third_party/source_level_debugger/igfx_debug_interchange_types.h Related-To: NEO-7213 Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7330974116
commit
6fca8ee195
@@ -15,7 +15,6 @@
|
||||
#include "shared/source/helpers/addressing_mode_helper.h"
|
||||
#include "shared/source/helpers/compiler_options_parser.h"
|
||||
#include "shared/source/program/kernel_info.h"
|
||||
#include "shared/source/source_level_debugger/source_level_debugger.h"
|
||||
#include "shared/source/utilities/logger.h"
|
||||
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
@@ -90,20 +89,6 @@ cl_int Program::build(
|
||||
break;
|
||||
}
|
||||
|
||||
if (isKernelDebugEnabled()) {
|
||||
std::string filename;
|
||||
for (const auto &clDevice : deviceVector) {
|
||||
if (BuildPhase::SourceCodeNotification == phaseReached[clDevice->getRootDeviceIndex()]) {
|
||||
continue;
|
||||
}
|
||||
appendKernelDebugOptions(*clDevice, internalOptions);
|
||||
notifyDebuggerWithSourceCode(*clDevice, filename);
|
||||
prependFilePathToOptions(filename);
|
||||
|
||||
phaseReached[clDevice->getRootDeviceIndex()] = BuildPhase::SourceCodeNotification;
|
||||
}
|
||||
}
|
||||
|
||||
std::string extensions = requiresOpenClCFeatures(options) ? defaultClDevice->peekCompilerExtensionsWithFeatures()
|
||||
: defaultClDevice->peekCompilerExtensions();
|
||||
|
||||
@@ -179,7 +164,7 @@ cl_int Program::build(
|
||||
break;
|
||||
}
|
||||
|
||||
if (isKernelDebugEnabled() || gtpinIsGTPinInitialized()) {
|
||||
if (gtpinIsGTPinInitialized()) {
|
||||
debugNotify(deviceVector, phaseReached);
|
||||
}
|
||||
notifyModuleCreate();
|
||||
@@ -200,20 +185,9 @@ cl_int Program::build(
|
||||
bool Program::appendKernelDebugOptions(ClDevice &clDevice, std::string &internalOptions) {
|
||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::debugKernelEnable);
|
||||
CompilerOptions::concatenateAppend(options, CompilerOptions::generateDebugInfo);
|
||||
|
||||
auto debugger = clDevice.getSourceLevelDebugger();
|
||||
if (debugger && (NEO::SourceLevelDebugger::shouldAppendOptDisable(*debugger))) {
|
||||
CompilerOptions::concatenateAppend(options, CompilerOptions::optDisable);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Program::notifyDebuggerWithSourceCode(ClDevice &clDevice, std::string &filename) {
|
||||
if (clDevice.getSourceLevelDebugger()) {
|
||||
clDevice.getSourceLevelDebugger()->notifySourceCode(sourceCode.c_str(), sourceCode.size(), filename);
|
||||
}
|
||||
}
|
||||
|
||||
cl_int Program::build(const ClDeviceVector &deviceVector, const char *buildOptions,
|
||||
std::unordered_map<std::string, BuiltinDispatchInfoBuilder *> &builtinsMap) {
|
||||
auto ret = this->build(deviceVector, buildOptions);
|
||||
@@ -255,7 +229,13 @@ void Program::debugNotify(const ClDeviceVector &deviceVector, std::unordered_map
|
||||
if (BuildPhase::DebugDataNotification == phasesReached[rootDeviceIndex]) {
|
||||
continue;
|
||||
}
|
||||
notifyDebuggerWithDebugData(clDevice);
|
||||
|
||||
auto &buildInfo = this->buildInfos[rootDeviceIndex];
|
||||
auto refBin = ArrayRef<const uint8_t>(reinterpret_cast<const uint8_t *>(buildInfo.unpackedDeviceBinary.get()), buildInfo.unpackedDeviceBinarySize);
|
||||
if (!NEO::isDeviceBinaryFormat<NEO::DeviceBinaryFormat::Zebin>(refBin)) {
|
||||
processDebugData(rootDeviceIndex);
|
||||
}
|
||||
|
||||
phasesReached[rootDeviceIndex] = BuildPhase::DebugDataNotification;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user