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

Unified Diff: base/trace_event/trace_event.h

Issue 2341333003: Use chromium trace_event implementation in blink (Closed)
Patch Set: Rebase Created 4 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 | « base/trace_event/common/trace_event_common.h ('k') | third_party/WebKit/Source/core/CoreInitializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event.h
diff --git a/base/trace_event/trace_event.h b/base/trace_event/trace_event.h
index 08576a88fe15766e6c8deb52d0312a38d411a971..7b113feb6d7b8d38cb27bb1a972660b1142514f4 100644
--- a/base/trace_event/trace_event.h
+++ b/base/trace_event/trace_event.h
@@ -64,6 +64,14 @@
#define TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(bucket_number) \
trace_event_internal::TraceEventSamplingStateScope<bucket_number>::Current()
+// Sets a current sampling state of the given bucket.
+// |categoryAndName| doesn't need to be a constant string.
oystein (OOO til 10th of July) 2016/09/20 18:11:17 nit: category_and_name
Xianzhu 2016/09/20 18:15:47 Done.
+// The format of the string is "category\0name".
+#define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET( \
+ bucket_number, category_and_name) \
+ trace_event_internal:: \
+ TraceEventSamplingStateScope<bucket_number>::Set(category_and_name)
+
// Creates a scope of a sampling state of the given bucket.
//
// { // The sampling state is set within this scope.
« no previous file with comments | « base/trace_event/common/trace_event_common.h ('k') | third_party/WebKit/Source/core/CoreInitializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698