From f552bbc1995a3b6dff5a6076c2535dfd23229ca8 Mon Sep 17 00:00:00 2001 From: Horatio Zhang Date: Wed, 9 Oct 2024 17:24:09 +0800 Subject: [PATCH] wsl/hsakmt: Remove redundant debug logging functions in utils.h Signed-off-by: Horatio Zhang Reviewed-by: Flora Cui Reviewed-by: Shane Xiao Part-of: --- util/utils.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/util/utils.h b/util/utils.h index d65d3b0d2f..15d61a87e1 100644 --- a/util/utils.h +++ b/util/utils.h @@ -115,42 +115,6 @@ static __forceinline unsigned long long int strtoull(const char* str, #define PASTE2(x, y) x##y #define PASTE(x, y) PASTE2(x, y) -#ifdef NDEBUG -#define debug_warning_n(exp, limit) \ - do { \ - } while (false) -#else -#define debug_warning_n(exp, limit) \ - do { \ - static std::atomic count(0); \ - if (!(exp) && (limit == 0 || count < limit)) { \ - fprintf(stderr, "Warning: " STRING(exp) " in %s, " __FILE__ ":" STRING(__LINE__) "\n", \ - __PRETTY_FUNCTION__); \ - fflush(stderr); \ - count++; \ - } \ - } while (false) -#endif -#define debug_warning(exp) debug_warning_n((exp), 0) - -#ifdef NDEBUG -#define debug_print(fmt, ...) \ - do { \ - } while (false) -#else -#define debug_print(fmt, ...) \ - do { \ - fprintf(stderr, fmt, ##__VA_ARGS__); \ - fflush(stderr); \ - } while (false) -#endif - -#ifdef NDEBUG -#define ifdebug if (false) -#else -#define ifdebug if (true) -#endif - #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #define LogPrint(flag, format, ...) \ @@ -159,7 +123,6 @@ static __forceinline unsigned long long int strtoull(const char* str, wsl::log_printf(__FILENAME__, __LINE__, format, ##__VA_ARGS__); \ } while (false); - // A macro to disallow the copy and move constructor and operator= functions #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&) = delete; \