SWDEV-236894 - Rename LOG_LEVEL to AMD_LOG_LEVEL
Change-Id: Ibdfaf0fb615ac343c05d0fa3c3ace9cbb592ecf3
[ROCm/clr commit: 49224d95c7]
Tento commit je obsažen v:
@@ -22,7 +22,7 @@
|
|||||||
#include "utils/debug.hpp"
|
#include "utils/debug.hpp"
|
||||||
#include "os/os.hpp"
|
#include "os/os.hpp"
|
||||||
|
|
||||||
#if !defined(LOG_LEVEL)
|
#if !defined(AMD_LOG_LEVEL)
|
||||||
#include "utils/flags.hpp"
|
#include "utils/flags.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -128,21 +128,21 @@ inline void warning(const char* msg) { amd::report_warning(msg); }
|
|||||||
|
|
||||||
#define Log(level, msg) \
|
#define Log(level, msg) \
|
||||||
do { \
|
do { \
|
||||||
if (LOG_LEVEL >= level) { \
|
if (AMD_LOG_LEVEL >= level) { \
|
||||||
amd::log_entry(level, __FILE__, __LINE__, msg); \
|
amd::log_entry(level, __FILE__, __LINE__, msg); \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
#define LogTS(level, msg) \
|
#define LogTS(level, msg) \
|
||||||
do { \
|
do { \
|
||||||
if (LOG_LEVEL >= level) { \
|
if (AMD_LOG_LEVEL >= level) { \
|
||||||
amd::log_timestamped(level, __FILE__, __LINE__, msg); \
|
amd::log_timestamped(level, __FILE__, __LINE__, msg); \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
#define Logf(level, format, ...) \
|
#define Logf(level, format, ...) \
|
||||||
do { \
|
do { \
|
||||||
if (LOG_LEVEL >= level) { \
|
if (AMD_LOG_LEVEL >= level) { \
|
||||||
amd::log_printf(level, __FILE__, __LINE__, format, __VA_ARGS__); \
|
amd::log_printf(level, __FILE__, __LINE__, format, __VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while (false)
|
||||||
@@ -156,7 +156,7 @@ inline void warning(const char* msg) { amd::report_warning(msg); }
|
|||||||
|
|
||||||
#define LogGuarantee(cond, level, msg) \
|
#define LogGuarantee(cond, level, msg) \
|
||||||
do { \
|
do { \
|
||||||
if (LOG_LEVEL >= level) { \
|
if (AMD_LOG_LEVEL >= level) { \
|
||||||
guarantee(cond); \
|
guarantee(cond); \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} 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")
|
#define DebugInfoGuarantee(cond) LogGuarantee(cond, amd::LOG_INFO, "Warning")
|
||||||
|
|
||||||
/* backend and compiler use LOG_LEVEL macro from makefile. Define GPU_LOG_MASK for them. */
|
/* backend and compiler use AMD_LOG_LEVEL macro from makefile. Define AMD_LOG_MASK for them. */
|
||||||
#if defined(LOG_LEVEL)
|
#if defined(AMD_LOG_LEVEL)
|
||||||
#define GPU_LOG_MASK 0x7FFFFFFF
|
#define AMD_LOG_MASK 0x7FFFFFFF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// You may define CL_LOG to enable following log functions even for release build
|
// 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
|
#ifdef CL_LOG
|
||||||
#define ClPrint(level, mask, format, ...) \
|
#define ClPrint(level, mask, format, ...) \
|
||||||
do { \
|
do { \
|
||||||
if (LOG_LEVEL >= level) { \
|
if (AMD_LOG_LEVEL >= level) { \
|
||||||
if (GPU_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \
|
if (AMD_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \
|
||||||
if (GPU_LOG_MASK & amd::LOG_LOCATION) { \
|
if (AMD_LOG_MASK & amd::LOG_LOCATION) { \
|
||||||
amd::log_printf(level, __FILENAME__, __LINE__, format, ##__VA_ARGS__); \
|
amd::log_printf(level, __FILENAME__, __LINE__, format, ##__VA_ARGS__); \
|
||||||
} else { \
|
} else { \
|
||||||
amd::log_printf(level, "", 0, format, ##__VA_ARGS__); \
|
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, ...) \
|
#define ClCondPrint(level, mask, condition, format, ...) \
|
||||||
do { \
|
do { \
|
||||||
if (LOG_LEVEL >= level && (condition)) { \
|
if (AMD_LOG_LEVEL >= level && (condition)) { \
|
||||||
if (GPU_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \
|
if (AMD_LOG_MASK & mask || mask == amd::LOG_ALWAYS) { \
|
||||||
amd::log_printf(level, __FILE__, __LINE__, format, ##__VA_ARGS__); \
|
amd::log_printf(level, __FILE__, __LINE__, format, ##__VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
|||||||
@@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
#define RUNTIME_FLAGS(debug,release,release_on_stg) \
|
#define RUNTIME_FLAGS(debug,release,release_on_stg) \
|
||||||
\
|
\
|
||||||
release(int, LOG_LEVEL, 0, \
|
release(int, AMD_LOG_LEVEL, 0, \
|
||||||
"The default log level") \
|
"The default log level") \
|
||||||
release(uint, GPU_LOG_MASK, 0X7FFFFFFF, \
|
release(uint, AMD_LOG_MASK, 0X7FFFFFFF, \
|
||||||
"The mask to enable specific kinds of logs") \
|
"The mask to enable specific kinds of logs") \
|
||||||
debug(uint, DEBUG_GPU_FLAGS, 0, \
|
debug(uint, DEBUG_GPU_FLAGS, 0, \
|
||||||
"The debug options for GPU device") \
|
"The debug options for GPU device") \
|
||||||
|
|||||||
Odkázat v novém úkolu
Zablokovat Uživatele