Index: base/debug/trace_event.h |
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h |
index f9dc1c94d6d65b885772a4b1bf3b16005c58c2e9..52a02e009ca66eea334cdcf3a80488281994ef2c 100644 |
--- a/base/debug/trace_event.h |
+++ b/base/debug/trace_event.h |
@@ -634,6 +634,39 @@ |
static_cast<int>(base::PlatformThread::CurrentId()), \ |
timestamp, TRACE_EVENT_FLAG_NONE) |
+ |
+// Records a single NET_LOG_BEGIN event called "name" immediately, with 2 |
+// associated arguments. If the category is not enabled, then this |
nduca
2014/09/03 05:37:23
not just 2
xunjieli
2014/09/03 14:51:09
There are two associated arguments right? arg1 and
|
+// does nothing. |
+// - category and name strings must have application lifetime (statics or |
+// literals). They may not include " chars. |
+// - |id| is used to match the NET_LOG_BEGIN event with the NET_LOG_END event. |
+// Events are considered to match if their category_group, name and id values |
+// all match. |id| must either be a pointer or an integer value up to 64 bits. |
+// If it's a pointer, the bits will be xored with a hash of the process ID so |
+// that the same pointer on two different processes will not collide. |
+// NET_LOG_ events are supposed to be used for logging NetLog events only. |
nduca
2014/09/03 05:37:24
Please retitle to nestable_async_*.
Tracing is ne
xunjieli
2014/09/03 14:51:09
Done. Since dsinclair mentioned that the existing
|
+ |
+#define TRACE_EVENT_NET_LOG_BEGIN2(category_group, name, id, arg1_name, \ |
+ arg1_val, arg2_name, arg2_val) \ |
+ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NET_LOG_BEGIN, \ |
+ category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
+ arg2_name, arg2_val) |
+// Records a single NET_LOG_END event for "name" immediately. If the category |
+// is not enabled, then this does nothing. |
+#define TRACE_EVENT_NET_LOG_END2(category_group, name, id, arg1_name, arg1_val, \ |
+ arg2_name, arg2_val) \ |
+ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NET_LOG_END, \ |
+ category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
+ arg2_name, arg2_val) |
+// Records a single NET_LOG_INSTANT event for "name" immediately. |
+// If the category is not enabled, then this does nothing. |
+#define TRACE_EVENT_NET_LOG_INSTANT2(category_group, name, id, arg1_name, \ |
+ arg1_val, arg2_name, arg2_val) \ |
+ INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NET_LOG_INSTANT, \ |
+ category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
+ arg2_name, arg2_val) |
+ |
// Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 |
// associated arguments. If the category is not enabled, then this |
// does nothing. |
@@ -972,6 +1005,9 @@ TRACE_EVENT_API_CLASS_EXPORT extern \ |
#define TRACE_EVENT_PHASE_CREATE_OBJECT ('N') |
#define TRACE_EVENT_PHASE_SNAPSHOT_OBJECT ('O') |
#define TRACE_EVENT_PHASE_DELETE_OBJECT ('D') |
+#define TRACE_EVENT_PHASE_NET_LOG_BEGIN ('x') |
xunjieli
2014/09/02 20:21:46
Any letters that I can use? is x, y, z okay?
nduca
2014/09/03 05:37:24
how about looking at the other ones and thinking a
xunjieli
2014/09/03 14:51:10
Done.
On 2014/09/03 05:37:24, nduca wrote:
|
+#define TRACE_EVENT_PHASE_NET_LOG_END ('y') |
+#define TRACE_EVENT_PHASE_NET_LOG_INSTANT ('z') |
// Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. |
#define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) |