OLD | NEW |
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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 // - |id| is used to match a child NESTABLE_ASYNC event with its parent | 695 // - |id| is used to match a child NESTABLE_ASYNC event with its parent |
696 // NESTABLE_ASYNC event. Therefore, events in the same nested event tree must | 696 // NESTABLE_ASYNC event. Therefore, events in the same nested event tree must |
697 // be logged using the same id and category_group. | 697 // be logged using the same id and category_group. |
698 // | 698 // |
699 // Unmatched NESTABLE_ASYNC_END event will be parsed as an event that starts | 699 // Unmatched NESTABLE_ASYNC_END event will be parsed as an event that starts |
700 // at the first NESTABLE_ASYNC event of that id, and unmatched | 700 // at the first NESTABLE_ASYNC event of that id, and unmatched |
701 // NESTABLE_ASYNC_BEGIN event will be parsed as an event that ends at the last | 701 // NESTABLE_ASYNC_BEGIN event will be parsed as an event that ends at the last |
702 // NESTABLE_ASYNC event of that id. Corresponding warning messages for | 702 // NESTABLE_ASYNC event of that id. Corresponding warning messages for |
703 // unmatched events will be shown in the analysis view. | 703 // unmatched events will be shown in the analysis view. |
704 | 704 |
705 // Records a single NESTABLE_ASYNC_BEGIN event called "name" immediately, with 2 | 705 // Records a single NESTABLE_ASYNC_BEGIN event called "name" immediately, with 1 |
706 // associated arguments. If the category is not enabled, then this does nothing. | 706 // or 2 associated arguments. If the category is not enabled, then this does |
| 707 // nothing. |
| 708 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN0(category_group, name, id) \ |
| 709 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ |
| 710 category_group, name, id, TRACE_EVENT_FLAG_NONE) |
| 711 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(category_group, name, id, arg1_name, \ |
| 712 arg1_val) \ |
| 713 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ |
| 714 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) |
707 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ | 715 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ |
708 arg1_val, arg2_name, arg2_val) \ | 716 arg1_val, arg2_name, arg2_val) \ |
709 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ | 717 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ |
710 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ | 718 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
711 arg2_name, arg2_val) | 719 arg2_name, arg2_val) |
712 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 2 | 720 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 1 |
713 // associated arguments. If the category is not enabled, then this does nothing. | 721 // or 2 associated arguments. If the category is not enabled, then this does |
| 722 // nothing. |
| 723 #define TRACE_EVENT_NESTABLE_ASYNC_END0(category_group, name, id) \ |
| 724 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ |
| 725 category_group, name, id, TRACE_EVENT_FLAG_NONE) |
| 726 #define TRACE_EVENT_NESTABLE_ASYNC_END1(category_group, name, id, arg1_name, \ |
| 727 arg1_val) \ |
| 728 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ |
| 729 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) |
714 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ | 730 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ |
715 arg1_val, arg2_name, arg2_val) \ | 731 arg1_val, arg2_name, arg2_val) \ |
716 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ | 732 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ |
717 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ | 733 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
718 arg2_name, arg2_val) | 734 arg2_name, arg2_val) |
719 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, | 735 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, |
720 // with 2 associated arguments. If the category is not enabled, then this | 736 // with 2 associated arguments. If the category is not enabled, then this |
721 // does nothing. | 737 // does nothing. |
722 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ | 738 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ |
723 arg1_name, arg1_val, arg2_name, arg2_val) \ | 739 arg1_name, arg1_val, arg2_name, arg2_val) \ |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 const char* name_; | 1649 const char* name_; |
1634 IDType id_; | 1650 IDType id_; |
1635 | 1651 |
1636 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1652 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
1637 }; | 1653 }; |
1638 | 1654 |
1639 } // namespace trace_event | 1655 } // namespace trace_event |
1640 } // namespace base | 1656 } // namespace base |
1641 | 1657 |
1642 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 1658 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
OLD | NEW |