Home | History | Annotate | Download | only in chromium

Lines Matching refs:category

79 //       TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this);
82 // TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this);
115 // in for category, name, and arg_names. Thus, the following code will
123 // Notes: The category must always be in a long-lived char* (i.e. static const).
129 // TRACE_EVENT1("category", "name",
132 // TRACE_EVENT1("category", "name",
135 // TRACE_EVENT1("category", "name",
140 // A thread safe singleton and mutex are used for thread safety. Category
144 // TRACE_EVENT macros first cache a pointer to a category. The categories are
146 // category is protected by the TraceLog::lock_. Multiple threads initializing
148 // multiple calls will return the same pointer to the category.
159 // Without the use of these static category pointers and enabled flags all
161 // and resolving the category.
177 // scope, with 0, 1 or 2 associated arguments. If the category is not
179 // - category and name strings must have application lifetime (statics or
181 #define TRACE_EVENT0(category, name) \
182 INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name)
183 #define TRACE_EVENT1(category, name, arg1_name, arg1_val) \
184 INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, arg1_name, arg1_val)
185 #define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val) \
186 INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, arg1_name, arg1_val, \
190 // associated arguments. If the category is not enabled, then this
192 // - category and name strings must have application lifetime (statics or
194 #define TRACE_EVENT_INSTANT0(category, name) \
196 category, name, TRACE_EVENT_FLAG_NONE)
197 #define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \
199 category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
200 #define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \
203 category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
205 #define TRACE_EVENT_COPY_INSTANT0(category, name) \
207 category, name, TRACE_EVENT_FLAG_COPY)
208 #define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \
210 category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
211 #define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \
214 category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
218 // associated arguments. If the category is not enabled, then this
220 // - category and name strings must have application lifetime (statics or
222 #define TRACE_EVENT_BEGIN0(category, name) \
224 category, name, TRACE_EVENT_FLAG_NONE)
225 #define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \
227 category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
228 #define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \
231 category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
233 #define TRACE_EVENT_COPY_BEGIN0(category, name) \
235 category, name, TRACE_EVENT_FLAG_COPY)
236 #define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \
238 category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
239 #define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \
242 category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
245 // Records a single END event for "name" immediately. If the category
247 // - category and name strings must have application lifetime (statics or
249 #define TRACE_EVENT_END0(category, name) \
251 category, name, TRACE_EVENT_FLAG_NONE)
252 #define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \
254 category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
255 #define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \
258 category, name, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
260 #define TRACE_EVENT_COPY_END0(category, name) \
262 category, name, TRACE_EVENT_FLAG_COPY)
263 #define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \
265 category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val)
266 #define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \
269 category, name, TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, \
274 // - category and name strings must have application lifetime (statics or
276 #define TRACE_COUNTER1(category, name, value) \
278 category, name, TRACE_EVENT_FLAG_NONE, \
280 #define TRACE_COPY_COUNTER1(category, name, value) \
282 category, name, TRACE_EVENT_FLAG_COPY, \
288 // - category and name strings must have application lifetime (statics or
290 #define TRACE_COUNTER2(category, name, value1_name, value1_val, \
293 category, name, TRACE_EVENT_FLAG_NONE, \
296 #define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \
299 category, name, TRACE_EVENT_FLAG_COPY, \
305 // - category and name strings must have application lifetime (statics or
311 #define TRACE_COUNTER_ID1(category, name, id, value) \
313 category, name, id, TRACE_EVENT_FLAG_NONE, \
315 #define TRACE_COPY_COUNTER_ID1(category, name, id, value) \
317 category, name, id, TRACE_EVENT_FLAG_COPY, \
323 // - category and name strings must have application lifetime (statics or
329 #define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \
332 category, name, id, TRACE_EVENT_FLAG_NONE, \
335 #define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, value1_val, \
338 category, name, id, TRACE_EVENT_FLAG_COPY, \
343 // associated arguments. If the category is not enabled, then this
345 // - category and name strings must have application lifetime (statics or
348 // events are considered to match if their category, name and id values all
358 #define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
360 category, name, id, TRACE_EVENT_FLAG_NONE)
361 #define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
363 category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
364 #define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
367 category, name, id, TRACE_EVENT_FLAG_NONE, \
369 #define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \
371 category, name, id, TRACE_EVENT_FLAG_COPY)
372 #define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
374 category, name, id, TRACE_EVENT_FLAG_COPY, \
376 #define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
379 category, name, id, TRACE_EVENT_FLAG_COPY, \
382 // Records a single ASYNC_STEP event for |step| immediately. If the category
387 #define TRACE_EVENT_ASYNC_STEP0(category, name, id, step) \
389 category, name, id, TRACE_EVENT_FLAG_NONE, "step", step)
390 #define TRACE_EVENT_ASYNC_STEP1(category, name, id, step, \
393 category, name, id, TRACE_EVENT_FLAG_NONE, "step", step, \
395 #define TRACE_EVENT_COPY_ASYNC_STEP0(category, name, id, step) \
397 category, name, id, TRACE_EVENT_FLAG_COPY, "step", step)
398 #define TRACE_EVENT_COPY_ASYNC_STEP1(category, name, id, step, \
401 category, name, id, TRACE_EVENT_FLAG_COPY, "step", step, \
404 // Records a single ASYNC_END event for "name" immediately. If the category
406 #define TRACE_EVENT_ASYNC_END0(category, name, id) \
408 category, name, id, TRACE_EVENT_FLAG_NONE)
409 #define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
411 category, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
412 #define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
415 category, name, id, TRACE_EVENT_FLAG_NONE, \
417 #define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \
419 category, name, id, TRACE_EVENT_FLAG_COPY)
420 #define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
422 category, name, id, TRACE_EVENT_FLAG_COPY, \
424 #define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
427 category, name, id, TRACE_EVENT_FLAG_COPY, \
430 // Creates a scope of a sampling state with the given category and name (both must
432 // Implementation note: we store category and name together because we don't
438 // TRACE_EVENT_SAMPLING_STATE_SCOPE_FOR_BUCKET(0, "category", "name");
441 #define TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(bucket_number, category, name) \
442 TraceEvent::SamplingStateScope<bucket_number> traceEventSamplingScope(category "\0" name);
445 // The format of the returned string is "category\0name".
450 // |category| and |name| have to be constant strings.
451 #define TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(bucket_number, category, name) \
452 TraceEvent::SamplingStateScope<bucket_number>::set(category "\0" name)
456 // The format of the string is "category\0name".
461 #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \
462 TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name)
465 #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \
466 TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name)
473 // Get a pointer to the enabled state of the given trace category. Only
474 // long-lived literal strings should be given as the category name. The returned
512 // Implementation detail: internal macro to create static category.
514 #define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category) \
517 "trace_event category"); \
520 TRACE_EVENT_API_GET_CATEGORY_ENABLED(category);
522 // Implementation detail: internal macro to create static category and add
523 // event if the category is enabled.
524 #define INTERNAL_TRACE_EVENT_ADD(phase, category, name, flags, ...) \
526 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \
534 // Implementation detail: internal macro to create static category and add begin
535 // event if the category is enabled. Also adds the end event when the scope
537 #define INTERNAL_TRACE_EVENT_ADD_SCOPED(category, name, ...) \
538 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \
551 // Implementation detail: internal macro to create static category and add
552 // event if the category is enabled.
553 #define INTERNAL_TRACE_EVENT_ADD_WITH_ID(phase, category, name, id, flags, \
556 INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(category); \
790 // Add the end event if the category is still enabled.