cef_trace_event::CefTraceEndOnScopeClose CEF_INTERNAL_TRACE_EVENT_UID()

in include/base/cef_trace_event.h [179:411]


  cef_trace_event::CefTraceEndOnScopeClose CEF_INTERNAL_TRACE_EVENT_UID( \
      profileScope)(category, name)

// Records a single event called "name" immediately, with 0, 1 or 2
// associated arguments. 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.
#define TRACE_EVENT_INSTANT0(category, name) \
  cef_trace_event_instant(category, name, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \
  cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, false)
#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, arg2_name, \
                             arg2_val)                                       \
  cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name,    \
                          arg2_val, false)
#define TRACE_EVENT_COPY_INSTANT0(category, name) \
  cef_trace_event_instant(category, name, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \
  cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, true)
#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val,    \
                                  arg2_name, arg2_val)                    \
  cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \
                          arg2_val, true)

// Records a single BEGIN event called "name" immediately, with 0, 1 or 2
// associated arguments. 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.
#define TRACE_EVENT_BEGIN0(category, name) \
  cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \
  cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false)
#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, arg2_name, \
                           arg2_val)                                       \
  cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name,    \
                        arg2_val, false)
#define TRACE_EVENT_COPY_BEGIN0(category, name) \
  cef_trace_event_begin(category, name, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \
  cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, true)
#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val,    \
                                arg2_name, arg2_val)                    \
  cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
                        arg2_val, true)

// Records a single END event for "name" immediately. 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.
#define TRACE_EVENT_END0(category, name) \
  cef_trace_event_end(category, name, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \
  cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, false)
#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, arg2_name, \
                         arg2_val)                                       \
  cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name,    \
                      arg2_val, false)
#define TRACE_EVENT_COPY_END0(category, name) \
  cef_trace_event_end(category, name, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \
  cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, true)
#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, arg2_name, \
                              arg2_val)                                       \
  cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name,         \
                      arg2_val, true)

// Records the value of a counter called "name" immediately. Value
// must be representable as a 32 bit integer.
// - category and name strings must have application lifetime (statics or
//   literals). They may not include " chars.
#define TRACE_COUNTER1(category, name, value) \
  cef_trace_counter(category, name, NULL, value, NULL, 0, false)
#define TRACE_COPY_COUNTER1(category, name, value) \
  cef_trace_counter(category, name, NULL, value, NULL, 0, true)

// Records the values of a multi-parted counter called "name" immediately.
// The UI will treat value1 and value2 as parts of a whole, displaying their
// values as a stacked-bar chart.
// - category and name strings must have application lifetime (statics or
//   literals). They may not include " chars.
#define TRACE_COUNTER2(category, name, value1_name, value1_val, value2_name, \
                       value2_val)                                           \
  cef_trace_counter(category, name, value1_name, value1_val, value2_name,    \
                    value2_val, false)
#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val,      \
                            value2_name, value2_val)                      \
  cef_trace_counter(category, name, value1_name, value1_val, value2_name, \
                    value2_val, true)

// Records the value of a counter called "name" immediately. Value
// must be representable as a 32 bit integer.
// - category and name strings must have application lifetime (statics or
//   literals). They may not include " chars.
// - |id| is used to disambiguate counters with the same name. It 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.
#define TRACE_COUNTER_ID1(category, name, id, value) \
  cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, false)
#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \
  cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, true)

// Records the values of a multi-parted counter called "name" immediately.
// The UI will treat value1 and value2 as parts of a whole, displaying their
// values as a stacked-bar chart.
// - category and name strings must have application lifetime (statics or
//   literals). They may not include " chars.
// - |id| is used to disambiguate counters with the same name. It 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.
#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \
                          value2_name, value2_val)                     \
  cef_trace_counter_id(category, name, id, value1_name, value1_val,    \
                       value2_name, value2_val, false)
#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, value1_val, \
                               value2_name, value2_val)                     \
  cef_trace_counter_id(category, name, id, value1_name, value1_val,         \
                       value2_name, value2_val, true)

// Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2
// associated arguments. 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 ASYNC_BEGIN event with the ASYNC_END event.
//   ASYNC events are considered to match if their category, 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 sothat the same pointer on two different processes will not collide.
// An asynchronous operation can consist of multiple phases. The first phase is
// defined by the ASYNC_BEGIN calls. Additional phases can be defined using the
// ASYNC_STEP_BEGIN macros. When the operation completes, call ASYNC_END.
// An async operation can span threads and processes, but all events in that
// operation must use the same |name| and |id|. Each event can have its own
// args.
#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
  cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val)    \
  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \
                              0, false)
#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
                                 arg2_name, arg2_val)                     \
  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val,    \
                              arg2_name, arg2_val, false)
#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \
  cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL,   \
                              0, true)
#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
                                      arg2_name, arg2_val)                     \
  cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val,         \
                              arg2_name, arg2_val, true)

// Records a single ASYNC_STEP_INTO event for |step| immediately. If the
// category is not enabled, then this does nothing. The |name| and |id| must
// match the ASYNC_BEGIN event above. The |step| param identifies this step
// within the async event. This should be called at the beginning of the next
// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
// ASYNC_STEP_PAST events.
#define TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \
  cef_trace_event_async_step_into(category, name, id, step, NULL, 0, false)
#define TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, arg1_name, \
                                     arg1_val)                            \
  cef_trace_event_async_step_into(category, name, id, step, arg1_name,    \
                                  arg1_val, false)
#define TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \
  cef_trace_event_async_step_into(category, name, id, step, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, arg1_name, \
                                          arg1_val)                            \
  cef_trace_event_async_step_into(category, name, id, step, arg1_name,         \
                                  arg1_val, true)

// Records a single ASYNC_STEP_PAST event for |step| immediately. If the
// category is not enabled, then this does nothing. The |name| and |id| must
// match the ASYNC_BEGIN event above. The |step| param identifies this step
// within the async event. This should be called at the beginning of the next
// phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
// ASYNC_STEP_INTO events.
#define TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \
  cef_trace_event_async_step_past(category, name, id, step, NULL, 0, false)
#define TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, arg1_name, \
                                     arg1_val)                            \
  cef_trace_event_async_step_past(category, name, id, step, arg1_name,    \
                                  arg1_val, false)
#define TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \
  cef_trace_event_async_step_past(category, name, id, step, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, arg1_name, \
                                          arg1_val)                            \
  cef_trace_event_async_step_past(category, name, id, step, arg1_name,         \
                                  arg1_val, true)

// Records a single ASYNC_END event for "name" immediately. If the category
// is not enabled, then this does nothing.
#define TRACE_EVENT_ASYNC_END0(category, name, id) \
  cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, false)
#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val)       \
  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
                            false)
#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
                               arg2_name, arg2_val)                     \
  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val,    \
                            arg2_name, arg2_val, false)
#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \
  cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, true)
#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, arg1_val)  \
  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
                            true)
#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
                                    arg2_name, arg2_val)                     \
  cef_trace_event_async_end(category, name, id, arg1_name, arg1_val,         \
                            arg2_name, arg2_val, true)

namespace cef_trace_event {

// Used by TRACE_EVENTx macro. Do not use directly.
class CefTraceEndOnScopeClose {
 public:
  CefTraceEndOnScopeClose(const char* category, const char* name)
      : category_(category), name_(name) {}
  ~CefTraceEndOnScopeClose() {
    cef_trace_event_end(category_, name_, NULL, 0, NULL, 0, false);
  }

 private:
  const char* category_;
  const char* name_;
};

}  // cef_trace_event