Commit f0360c60 by Austin Kinross Committed by Geoff Lang

Rename ANGLE_ENABLE_TRACE -> ANGLE_ENABLE_DEBUG_TRACE

Change-Id: Ib70c456c8d01161e370b9165ff4daa2f0f90c840 Reviewed-on: https://chromium-review.googlesource.com/223591Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 570e83cf
...@@ -25,7 +25,7 @@ typedef void (*PerfOutputFunction)(unsigned int, const wchar_t*); ...@@ -25,7 +25,7 @@ typedef void (*PerfOutputFunction)(unsigned int, const wchar_t*);
static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg) static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg)
{ {
#if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) || defined(ANGLE_ENABLE_TRACE) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) || defined(ANGLE_ENABLE_DEBUG_TRACE)
std::string formattedMessage = FormatString(format, vararg); std::string formattedMessage = FormatString(format, vararg);
#endif #endif
...@@ -45,7 +45,7 @@ static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const c ...@@ -45,7 +45,7 @@ static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const c
} }
#endif // ANGLE_ENABLE_DEBUG_ANNOTATIONS #endif // ANGLE_ENABLE_DEBUG_ANNOTATIONS
#if defined(ANGLE_ENABLE_TRACE) #if defined(ANGLE_ENABLE_DEBUG_TRACE)
#if defined(NDEBUG) #if defined(NDEBUG)
if (traceFileDebugOnly) if (traceFileDebugOnly)
{ {
...@@ -60,7 +60,7 @@ static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const c ...@@ -60,7 +60,7 @@ static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const c
file.flush(); file.flush();
} }
#endif // ANGLE_ENABLE_TRACE #endif // ANGLE_ENABLE_DEBUG_TRACE
} }
void trace(bool traceFileDebugOnly, const char *format, ...) void trace(bool traceFileDebugOnly, const char *format, ...)
...@@ -87,12 +87,12 @@ bool perfActive() ...@@ -87,12 +87,12 @@ bool perfActive()
ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...) ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
{ {
#if !defined(ANGLE_ENABLE_TRACE) #if !defined(ANGLE_ENABLE_DEBUG_TRACE)
if (!perfActive()) if (!perfActive())
{ {
return; return;
} }
#endif // !ANGLE_ENABLE_TRACE #endif // !ANGLE_ENABLE_DEBUG_TRACE
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
#if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
......
...@@ -39,28 +39,28 @@ namespace gl ...@@ -39,28 +39,28 @@ namespace gl
} }
// A macro to output a trace of a function call and its arguments to the debugging log // A macro to output a trace of a function call and its arguments to the debugging log
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) #if defined(ANGLE_ENABLE_DEBUG_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#define TRACE(message, ...) gl::trace(true, "trace: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) #define TRACE(message, ...) gl::trace(true, "trace: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else #else
#define TRACE(message, ...) (void(0)) #define TRACE(message, ...) (void(0))
#endif #endif
// A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing. // A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing.
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) #if defined(ANGLE_ENABLE_DEBUG_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#define FIXME(message, ...) gl::trace(false, "fixme: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) #define FIXME(message, ...) gl::trace(false, "fixme: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else #else
#define FIXME(message, ...) (void(0)) #define FIXME(message, ...) (void(0))
#endif #endif
// A macro to output a function call and its arguments to the debugging log, in case of error. // A macro to output a function call and its arguments to the debugging log, in case of error.
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) #if defined(ANGLE_ENABLE_DEBUG_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#define ERR(message, ...) gl::trace(false, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) #define ERR(message, ...) gl::trace(false, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else #else
#define ERR(message, ...) (void(0)) #define ERR(message, ...) (void(0))
#endif #endif
// A macro to log a performance event around a scope. // A macro to log a performance event around a scope.
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) #if defined(ANGLE_ENABLE_DEBUG_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper ## __LINE__("%s" message "\n", __FUNCTION__, __VA_ARGS__); #define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper ## __LINE__("%s" message "\n", __FUNCTION__, __VA_ARGS__);
#else #else
...@@ -83,7 +83,7 @@ namespace gl ...@@ -83,7 +83,7 @@ namespace gl
#define UNUSED_ASSERTION_VARIABLE(variable) ((void)variable) #define UNUSED_ASSERTION_VARIABLE(variable) ((void)variable)
#endif #endif
#ifndef ANGLE_ENABLE_TRACE #ifndef ANGLE_ENABLE_DEBUG_TRACE
#define UNUSED_TRACE_VARIABLE(variable) ((void)variable) #define UNUSED_TRACE_VARIABLE(variable) ((void)variable)
#else #else
#define UNUSED_TRACE_VARIABLE(variable) #define UNUSED_TRACE_VARIABLE(variable)
......
...@@ -55,7 +55,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved ...@@ -55,7 +55,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
{ {
#if defined(ANGLE_ENABLE_TRACE) #if defined(ANGLE_ENABLE_DEBUG_TRACE)
FILE *debug = fopen(TRACE_OUTPUT_FILE, "rt"); FILE *debug = fopen(TRACE_OUTPUT_FILE, "rt");
if (debug) if (debug)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment