| 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 |
| 706 // associated arguments. If the category is not enabled, then this does nothing. | 706 // 0, 1 or 2 associated arguments. If the category is not enabled, then this |
| 707 // does 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) |
| 720 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 0, |
| 721 // 1, 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) |
| 730 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ |
| 731 arg1_val, arg2_name, arg2_val) \ |
| 732 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, \ |
| 734 arg2_name, arg2_val) |
| 735 |
| 712 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2(category_group, name, \ | 736 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2(category_group, name, \ |
| 713 id, arg1_name, arg1_val, arg2_name, arg2_val) \ | 737 id, arg1_name, arg1_val, arg2_name, arg2_val) \ |
| 714 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ | 738 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \ |
| 715 category_group, name, id, \ | 739 category_group, name, id, \ |
| 716 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ | 740 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ |
| 717 arg1_name, arg1_val, arg2_name, arg2_val) | 741 arg1_name, arg1_val, arg2_name, arg2_val) |
| 718 | |
| 719 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 2 | |
| 720 // associated arguments. If the category is not enabled, then this does nothing. | |
| 721 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ | |
| 722 arg1_val, arg2_name, arg2_val) \ | |
| 723 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ | |
| 724 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ | |
| 725 arg2_name, arg2_val) | |
| 726 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2(category_group, name, \ | 742 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2(category_group, name, \ |
| 727 id, arg1_name, arg1_val, arg2_name, arg2_val) \ | 743 id, arg1_name, arg1_val, arg2_name, arg2_val) \ |
| 728 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ | 744 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ |
| 729 category_group, name, id, \ | 745 category_group, name, id, \ |
| 730 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ | 746 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ |
| 731 arg1_name, arg1_val, arg2_name, arg2_val) | 747 arg1_name, arg1_val, arg2_name, arg2_val) |
| 732 | 748 |
| 733 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, | 749 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, |
| 734 // with 2 associated arguments. If the category is not enabled, then this | 750 // with 2 associated arguments. If the category is not enabled, then this |
| 735 // does nothing. | 751 // does nothing. |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 const char* name_; | 1664 const char* name_; |
| 1649 IDType id_; | 1665 IDType id_; |
| 1650 | 1666 |
| 1651 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1667 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
| 1652 }; | 1668 }; |
| 1653 | 1669 |
| 1654 } // namespace trace_event | 1670 } // namespace trace_event |
| 1655 } // namespace base | 1671 } // namespace base |
| 1656 | 1672 |
| 1657 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 1673 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
| OLD | NEW |