mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
feature: Add debug/release variable prefixes
Resolves: NEO-6357 Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6fca8ee195
commit
ec95d9314a
@@ -59,6 +59,13 @@ void logDebugString(std::string_view debugString);
|
||||
|
||||
class SettingsReader;
|
||||
|
||||
enum class DebugVarPrefix : uint8_t {
|
||||
None = 1,
|
||||
Neo = 2,
|
||||
Neo_L0 = 3,
|
||||
Neo_Ocl = 4
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct DebugVarBase {
|
||||
DebugVarBase(const T &defaultValue) : value(defaultValue), defaultValue(defaultValue) {}
|
||||
@@ -76,10 +83,17 @@ struct DebugVarBase {
|
||||
this->set(data);
|
||||
}
|
||||
}
|
||||
void setPrefixType(DebugVarPrefix data) {
|
||||
prefixType = std::move(data);
|
||||
}
|
||||
DebugVarPrefix getPrefixType() const {
|
||||
return prefixType;
|
||||
}
|
||||
|
||||
private:
|
||||
T value;
|
||||
T defaultValue;
|
||||
DebugVarPrefix prefixType = DebugVarPrefix::None;
|
||||
};
|
||||
|
||||
struct DebugVariables { // NOLINT(clang-analyzer-optin.performance.Padding)
|
||||
@@ -158,6 +172,8 @@ class DebugSettingsManager {
|
||||
|
||||
extern DebugSettingsManager<globalDebugFunctionalityLevel> DebugManager;
|
||||
|
||||
#define MAX_NEO_KEY_LENGTH 256
|
||||
|
||||
#define PRINT_DEBUGGER_LOG_TO_FILE(...) \
|
||||
NEO::DebugManager.logLazyEvaluateArgs([&] { \
|
||||
char temp[4000]; \
|
||||
|
||||
Reference in New Issue
Block a user