From 33270cd2a09b640ced2d96b9649c0cd765fd334f Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sat, 5 Sep 2015 21:12:10 -0700 Subject: [PATCH] Making tracing use the fast logger path. --- src/xenia/cpu/backend/x64/x64_tracers.cc | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_tracers.cc b/src/xenia/cpu/backend/x64/x64_tracers.cc index 67cb1490e..ad3de8285 100644 --- a/src/xenia/cpu/backend/x64/x64_tracers.cc +++ b/src/xenia/cpu/backend/x64/x64_tracers.cc @@ -11,6 +11,7 @@ #include +#include "xenia/base/logging.h" #include "xenia/base/vec128.h" #include "xenia/cpu/backend/x64/x64_emitter.h" #include "xenia/cpu/processor.h" @@ -30,19 +31,12 @@ bool trace_enabled = true; #define THREAD_MATCH \ (!TARGET_THREAD || thread_state->thread_id() == TARGET_THREAD) -#if !DTRACE -#define IFLUSH() \ - if (trace_enabled && THREAD_MATCH) fflush(stdout) -#else #define IFLUSH() -#endif -#define IPRINT \ - if (trace_enabled && THREAD_MATCH) printf -#define DFLUSH() \ - if (trace_enabled && THREAD_MATCH) fflush(stdout) -#define DPRINT \ - DFLUSH(); \ - if (trace_enabled && THREAD_MATCH) printf +#define IPRINT(s) \ + if (trace_enabled && THREAD_MATCH) xe::LogLine('t', s) +#define DFLUSH() +#define DPRINT(...) \ + if (trace_enabled && THREAD_MATCH) xe::LogLineFormat('t', __VA_ARGS__) uint32_t GetTracingMode() { uint32_t mode = 0; @@ -57,7 +51,7 @@ uint32_t GetTracingMode() { void TraceString(void* raw_context, const char* str) { auto thread_state = *reinterpret_cast(raw_context); - IPRINT("XE[t] :%d: %s\n", thread_state->thread_id(), str); + IPRINT(str); IFLUSH(); }