aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTraceEvent.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-07-24 15:21:31 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-24 20:02:07 +0000
commitb323a5ed1f26a5b8e4e9f8f78225bdf95dc5a177 (patch)
tree6015edd7fae15488eaaa05a570499adf4d3e3bb3 /src/core/SkTraceEvent.h
parent019ff27ac0167026f9f8f4aaec8fb6461d8ba21e (diff)
sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNC
Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6 Reviewed-on: https://skia-review.googlesource.com/26361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkTraceEvent.h')
-rw-r--r--src/core/SkTraceEvent.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/SkTraceEvent.h b/src/core/SkTraceEvent.h
index 8b9a15cff4..116330dcb5 100644
--- a/src/core/SkTraceEvent.h
+++ b/src/core/SkTraceEvent.h
@@ -17,6 +17,13 @@
////////////////////////////////////////////////////////////////////////////////
// Implementation specific tracing API definitions.
+// Makes it easier to add traces with a simple TRACE_EVENT0("skia", TRACE_FUNC).
+#if defined(_MSC_VER)
+ #define TRACE_FUNC __FUNCSIG__
+#else
+ #define TRACE_FUNC __PRETTY_FUNCTION__
+#endif
+
// By default, const char* argument values are assumed to have long-lived scope
// and will not be copied. Use this macro to force a const char* to be copied.
#define TRACE_STR_COPY(str) \