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 1 | 705 // Records a single NESTABLE_ASYNC_BEGIN event called "name" immediately, with 2 |
706 // or 2 associated arguments. If the category is not enabled, then this does | 706 // associated arguments. If the category is not enabled, then this does nothing. |
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) | |
715 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ | 707 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN2(category_group, name, id, arg1_name, \ |
716 arg1_val, arg2_name, arg2_val) \ | 708 arg1_val, arg2_name, arg2_val) \ |
717 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ | 709 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ |
718 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ | 710 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
719 arg2_name, arg2_val) | 711 arg2_name, arg2_val) |
720 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 1 | 712 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 2 |
721 // or 2 associated arguments. If the category is not enabled, then this does | 713 // associated arguments. If the category is not enabled, then this does nothing. |
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) | |
730 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ | 714 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ |
731 arg1_val, arg2_name, arg2_val) \ | 715 arg1_val, arg2_name, arg2_val) \ |
732 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ | 716 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ |
733 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ | 717 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
734 arg2_name, arg2_val) | 718 arg2_name, arg2_val) |
735 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, | 719 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, |
736 // with 2 associated arguments. If the category is not enabled, then this | 720 // with 2 associated arguments. If the category is not enabled, then this |
737 // does nothing. | 721 // does nothing. |
738 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ | 722 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ |
739 arg1_name, arg1_val, arg2_name, arg2_val) \ | 723 arg1_name, arg1_val, arg2_name, arg2_val) \ |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1649 const char* name_; | 1633 const char* name_; |
1650 IDType id_; | 1634 IDType id_; |
1651 | 1635 |
1652 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1636 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
1653 }; | 1637 }; |
1654 | 1638 |
1655 } // namespace trace_event | 1639 } // namespace trace_event |
1656 } // namespace base | 1640 } // namespace base |
1657 | 1641 |
1658 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 1642 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
OLD | NEW |