From d917bbfc733f62f53c47fc3232f60a2bac7fb79c Mon Sep 17 00:00:00 2001 From: Jason Tang Date: Mon, 18 May 2020 18:01:21 -0400 Subject: [PATCH] SWDEV-236894 - Rename LOG_LEVEL to AMD_LOG_LEVEL Change-Id: Ibdfaf0fb615ac343c05d0fa3c3ace9cbb592ecf3 [ROCm/clr commit: 49224d95c7c9dc40127f5967b0bb9eb075f8a94f] --- projects/clr/rocclr/utils/debug.cpp | 2 +- projects/clr/rocclr/utils/debug.hpp | 24 ++++++++++++------------ projects/clr/rocclr/utils/flags.hpp | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/projects/clr/rocclr/utils/debug.cpp b/projects/clr/rocclr/utils/debug.cpp index e0eb983ec1..20479c8572 100644 --- a/projects/clr/rocclr/utils/debug.cpp +++ b/projects/clr/rocclr/utils/debug.cpp @@ -22,7 +22,7 @@ #include "utils/debug.hpp" #include "os/os.hpp" -#if !defined(LOG_LEVEL) +#if !defined(AMD_LOG_LEVEL) #include "utils/flags.hpp" #endif diff --git a/projects/clr/rocclr/utils/debug.hpp b/projects/clr/rocclr/utils/debug.hpp index f2e44cb885..5902f559aa 100644 --- a/projects/clr/rocclr/utils/debug.hpp +++ b/projects/clr/rocclr/utils/debug.hpp @@ -128,21 +128,21 @@ inline void warning(const char* msg) { amd::report_warning(msg); } #define Log(level, msg) \ do { \ - if (LOG_LEVEL >= level) { \ + if (AMD_LOG_LEVEL >= level) { \ amd::log_entry(level, __FILE__, __LINE__, msg); \ } \ } while (false) #define LogTS(level, msg) \ do { \ - if (LOG_LEVEL >= level) { \ + if (AMD_LOG_LEVEL >= level) { \ amd::log_timestamped(level, __FILE__, __LINE__, msg); \ } \ } while (false) #define Logf(level, format, ...) \ do { \ - if (LOG_LEVEL >= level) { \ + if (AMD_LOG_LEVEL >= level) { \ amd::log_printf(level, __FILE__, __LINE__, format, __VA_ARGS__); \ } \ } while (false) @@ -156,7 +156,7 @@ inline void warning(const char* msg) { amd::report_warning(msg); } #define LogGuarantee(cond, level, msg) \ do { \ - if (LOG_LEVEL >= level) { \ + if (AMD_LOG_LEVEL >= level) { \ guarantee(cond); \ } \ } while (false) @@ -168,9 +168,9 @@ inline void warning(const char* msg) { amd::report_warning(msg); } #define DebugInfoGuarantee(cond) LogGuarantee(cond, amd::LOG_INFO, "Warning") -/* backend and compiler use LOG_LEVEL macro from makefile. Define GPU_LOG_MASK for them. */ -#if defined(LOG_LEVEL) -#define GPU_LOG_MASK 0x7FFFFFFF +/* backend and compiler use AMD_LOG_LEVEL macro from makefile. Define AMD_LOG_MASK for them. */ +#if defined(AMD_LOG_LEVEL) +#define AMD_LOG_MASK 0x7FFFFFFF #endif // You may define CL_LOG to enable following log functions even for release build @@ -179,9 +179,9 @@ inline void warning(const char* msg) { amd::report_warning(msg); } #ifdef CL_LOG #define ClPrint(level, mask, format, ...) \ do { \ - if (LOG_LEVEL >= level) { \ - if (GPU_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \ - if (GPU_LOG_MASK & amd::LOG_LOCATION) { \ + if (AMD_LOG_LEVEL >= level) { \ + if (AMD_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \ + if (AMD_LOG_MASK & amd::LOG_LOCATION) { \ amd::log_printf(level, __FILENAME__, __LINE__, format, ##__VA_ARGS__); \ } else { \ amd::log_printf(level, "", 0, format, ##__VA_ARGS__); \ @@ -192,8 +192,8 @@ inline void warning(const char* msg) { amd::report_warning(msg); } #define ClCondPrint(level, mask, condition, format, ...) \ do { \ - if (LOG_LEVEL >= level && (condition)) { \ - if (GPU_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \ + if (AMD_LOG_LEVEL >= level && (condition)) { \ + if (AMD_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \ amd::log_printf(level, __FILE__, __LINE__, format, ##__VA_ARGS__); \ } \ } \ diff --git a/projects/clr/rocclr/utils/flags.hpp b/projects/clr/rocclr/utils/flags.hpp index b357712dc9..388e355c93 100644 --- a/projects/clr/rocclr/utils/flags.hpp +++ b/projects/clr/rocclr/utils/flags.hpp @@ -24,9 +24,9 @@ #define RUNTIME_FLAGS(debug,release,release_on_stg) \ \ -release(int, LOG_LEVEL, 0, \ +release(int, AMD_LOG_LEVEL, 0, \ "The default log level") \ -release(uint, GPU_LOG_MASK, 0X7FFFFFFF, \ +release(uint, AMD_LOG_MASK, 0X7FFFFFFF, \ "The mask to enable specific kinds of logs") \ debug(uint, DEBUG_GPU_FLAGS, 0, \ "The debug options for GPU device") \