feature: Add debug/release variable prefixes

Resolves:  NEO-6357
Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
John Falkowski
2023-07-20 05:54:03 +00:00
committed by Compute-Runtime-Automation
parent 6fca8ee195
commit ec95d9314a
24 changed files with 1363 additions and 67 deletions

View File

@@ -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]; \