Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3196)

Unified Diff: base/debug/trace_event.h

Issue 7778033: Add trace code to track all posted tasks in message_loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed file/line merge from Location Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/debug/trace_event.cc » ('j') | base/debug/trace_event_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event.h
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h
index e7b3f90066ac8631099d0f39a8558ec517b7f810..61ffebc19170d158054166928f9242b526156ba9 100644
--- a/base/debug/trace_event.h
+++ b/base/debug/trace_event.h
@@ -141,6 +141,22 @@
INTERNAL_TRACE_EVENT_ADD_SCOPED( \
category, name, arg1_name, arg1_val, arg2_name, arg2_val)
+// Same as TRACE_EVENT except that they are not included in official builds.
+#ifdef OFFICIAL_BUILD
+#define UNSHIPPED_TRACE_EVENT0(category, name) (void)0
+#define UNSHIPPED_TRACE_EVENT1(category, name, arg1_name, arg1_val) (void)0
+#define UNSHIPPED_TRACE_EVENT2(category, name, arg1_name, arg1_val, \
+ arg2_name, arg2_val) (void)0
+#else
+#define UNSHIPPED_TRACE_EVENT0(category, name) \
+ TRACE_EVENT0(category, name)
+#define UNSHIPPED_TRACE_EVENT1(category, name, arg1_name, arg1_val) \
+ TRACE_EVENT1(category, name, arg1_name, arg1_val)
+#define UNSHIPPED_TRACE_EVENT2(category, name, arg1_name, arg1_val, \
+ arg2_name, arg2_val) \
+ TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val)
+#endif
+
// Records a single event called "name" immediately, with 0, 1 or 2
// associated arguments. If the category is not enabled, then this
// does nothing.
@@ -577,6 +593,9 @@ class BASE_EXPORT TraceLog {
// Exposed for unittesting:
+ // Allows deleting our singleton instance.
+ static void DeleteForTesting();
+
// Allows resurrecting our singleton instance post-AtExit processing.
static void Resurrect();
« no previous file with comments | « no previous file | base/debug/trace_event.cc » ('j') | base/debug/trace_event_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698