| Index: base/debug/trace_event.h
|
| diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h
|
| index f9dc1c94d6d65b885772a4b1bf3b16005c58c2e9..565812c1107cfddb0c46a484c2871e98065fe0f0 100644
|
| --- a/base/debug/trace_event.h
|
| +++ b/base/debug/trace_event.h
|
| @@ -634,6 +634,34 @@
|
| static_cast<int>(base::PlatformThread::CurrentId()), \
|
| timestamp, TRACE_EVENT_FLAG_NONE)
|
|
|
| +
|
| +// Records a single NET_LOG_BEGIN event called "name" immediately, with 1
|
| +// associated argument. If the category is not enabled, then this
|
| +// 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.
|
| +
|
| +#define TRACE_EVENT_NET_LOG_BEGIN(category_group, name, id, arg1_name, \
|
| + arg1_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)
|
| +// 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_END(category_group, name, id, arg1_name, arg1_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)
|
| +// 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_INSTANT(category_group, name, id, arg1_name, arg1_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)
|
| +
|
| // 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 +1000,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 ('b')
|
| +#define TRACE_EVENT_PHASE_NET_LOG_END ('e')
|
| +#define TRACE_EVENT_PHASE_NET_LOG_INSTANT ('i')
|
|
|
| // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT.
|
| #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0))
|
|
|