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. |