Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: base/trace_event/trace_event.h

Issue 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/trace_event/BUILD.gn ('k') | base/tracked_objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This header file defines the set of trace_event macros without specifying 5 // This header file defines the set of trace_event macros without specifying
6 // how the events actually get collected and stored. If you need to expose trace 6 // how the events actually get collected and stored. If you need to expose trace
7 // events to some other universe, you can copy-and-paste this file as well as 7 // events to some other universe, you can copy-and-paste this file as well as
8 // trace_event.h, modifying the macros contained there as necessary for the 8 // trace_event.h, modifying the macros contained there as necessary for the
9 // target platform. The end result is that multiple libraries can funnel events 9 // target platform. The end result is that multiple libraries can funnel events
10 // through to a shared trace event collector. 10 // through to a shared trace event collector.
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 category_group, name, id, TRACE_EVENT_FLAG_NONE, \ 513 category_group, name, id, TRACE_EVENT_FLAG_NONE, \
514 value1_name, static_cast<int>(value1_val), \ 514 value1_name, static_cast<int>(value1_val), \
515 value2_name, static_cast<int>(value2_val)) 515 value2_name, static_cast<int>(value2_val))
516 #define TRACE_COPY_COUNTER_ID2(category_group, name, id, value1_name, \ 516 #define TRACE_COPY_COUNTER_ID2(category_group, name, id, value1_name, \
517 value1_val, value2_name, value2_val) \ 517 value1_val, value2_name, value2_val) \
518 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \ 518 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_COUNTER, \
519 category_group, name, id, TRACE_EVENT_FLAG_COPY, \ 519 category_group, name, id, TRACE_EVENT_FLAG_COPY, \
520 value1_name, static_cast<int>(value1_val), \ 520 value1_name, static_cast<int>(value1_val), \
521 value2_name, static_cast<int>(value2_val)) 521 value2_name, static_cast<int>(value2_val))
522 522
523 // TRACE_EVENT_SAMPLE_* events are injected by the sampling profiler.
524 #define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP0(category_group, name, \
525 thread_id, timestamp) \
526 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
527 TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
528 TRACE_EVENT_FLAG_NONE)
529
530 #define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP1( \
531 category_group, name, thread_id, timestamp, arg1_name, arg1_val) \
532 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
533 TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
534 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val)
535
536 #define TRACE_EVENT_SAMPLE_WITH_TID_AND_TIMESTAMP2(category_group, name, \
537 thread_id, timestamp, \
538 arg1_name, arg1_val, \
539 arg2_name, arg2_val) \
540 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
541 TRACE_EVENT_PHASE_SAMPLE, category_group, name, 0, thread_id, timestamp, \
542 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val)
543
523 // ASYNC_STEP_* APIs should be only used by legacy code. New code should 544 // ASYNC_STEP_* APIs should be only used by legacy code. New code should
524 // consider using NESTABLE_ASYNC_* APIs to describe substeps within an async 545 // consider using NESTABLE_ASYNC_* APIs to describe substeps within an async
525 // event. 546 // event.
526 // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 547 // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2
527 // associated arguments. If the category is not enabled, then this 548 // associated arguments. If the category is not enabled, then this
528 // does nothing. 549 // does nothing.
529 // - category and name strings must have application lifetime (statics or 550 // - category and name strings must have application lifetime (statics or
530 // literals). They may not include " chars. 551 // literals). They may not include " chars.
531 // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC 552 // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC
532 // events are considered to match if their category_group, name and id values 553 // events are considered to match if their category_group, name and id values
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 const char* name_; 1622 const char* name_;
1602 IDType id_; 1623 IDType id_;
1603 1624
1604 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1625 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1605 }; 1626 };
1606 1627
1607 } // namespace trace_event 1628 } // namespace trace_event
1608 } // namespace base 1629 } // namespace base
1609 1630
1610 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1631 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « base/trace_event/BUILD.gn ('k') | base/tracked_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698