Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 741 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ | 741 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ |
| 742 category_group, name, id, \ | 742 category_group, name, id, \ |
| 743 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) | 743 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) |
| 744 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ | 744 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ |
| 745 arg1_val, arg2_name, arg2_val) \ | 745 arg1_val, arg2_name, arg2_val) \ |
| 746 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ | 746 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ |
| 747 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ | 747 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ |
| 748 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) | 748 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) |
| 749 | 749 |
| 750 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, | 750 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, |
| 751 // with one associated argument. If the category is not enabled, then this | 751 // with none, one or two associated argument. If the category is not enabled, |
| 752 // does nothing. | 752 // then this does nothing. |
| 753 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT0(category_group, name, id) \ | |
|
oystein (OOO til 10th of July)
2016/09/09 00:30:24
Are you adding this because you'll use it, or beca
carlosk
2016/09/09 00:34:12
Yes. :)
I'm adding new tracing calls to MHTMLGene
| |
| 754 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ | |
| 755 category_group, name, id, \ | |
| 756 TRACE_EVENT_FLAG_NONE) | |
| 753 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \ | 757 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT1(category_group, name, id, \ |
| 754 arg1_name, arg1_val) \ | 758 arg1_name, arg1_val) \ |
| 755 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ | 759 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ |
| 756 category_group, name, id, \ | 760 category_group, name, id, \ |
| 757 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) | 761 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) |
| 758 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, | |
| 759 // with 2 associated arguments. If the category is not enabled, then this | |
| 760 // does nothing. | |
| 761 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \ | 762 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \ |
| 762 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ | 763 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ |
| 763 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ | 764 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ |
| 764 TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ | 765 TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ |
| 765 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) | 766 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) |
| 766 | 767 |
| 767 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \ | 768 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2( \ |
| 768 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ | 769 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ |
| 769 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ | 770 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ |
| 770 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ | 771 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 795 category_group, name, id, timestamp) \ | 796 category_group, name, id, timestamp) \ |
| 796 INTERNAL_TRACE_EVENT_ADD_WITH_ID_AND_TIMESTAMP( \ | 797 INTERNAL_TRACE_EVENT_ADD_WITH_ID_AND_TIMESTAMP( \ |
| 797 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ | 798 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ |
| 798 timestamp, TRACE_EVENT_FLAG_COPY) | 799 timestamp, TRACE_EVENT_FLAG_COPY) |
| 799 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \ | 800 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( \ |
| 800 category_group, name, id, timestamp) \ | 801 category_group, name, id, timestamp) \ |
| 801 INTERNAL_TRACE_EVENT_ADD_WITH_ID_AND_TIMESTAMP( \ | 802 INTERNAL_TRACE_EVENT_ADD_WITH_ID_AND_TIMESTAMP( \ |
| 802 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ | 803 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ |
| 803 timestamp, TRACE_EVENT_FLAG_COPY) | 804 timestamp, TRACE_EVENT_FLAG_COPY) |
| 804 | 805 |
| 805 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, | |
| 806 // with 2 associated arguments. If the category is not enabled, then this | |
| 807 // does nothing. | |
| 808 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2( \ | |
| 809 category_group, name, id, arg1_name, arg1_val, arg2_name, arg2_val) \ | |
| 810 INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ | |
| 811 TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, category_group, name, id, \ | |
| 812 TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) | |
| 813 | |
| 814 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 | 806 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 |
| 815 // associated arguments. If the category is not enabled, then this | 807 // associated arguments. If the category is not enabled, then this |
| 816 // does nothing. | 808 // does nothing. |
| 817 // - category and name strings must have application lifetime (statics or | 809 // - category and name strings must have application lifetime (statics or |
| 818 // literals). They may not include " chars. | 810 // literals). They may not include " chars. |
| 819 // - |id| is used to match the FLOW_BEGIN event with the FLOW_END event. FLOW | 811 // - |id| is used to match the FLOW_BEGIN event with the FLOW_END event. FLOW |
| 820 // events are considered to match if their category_group, name and id values | 812 // events are considered to match if their category_group, name and id values |
| 821 // all match. |id| must either be a pointer or an integer value up to 64 bits. | 813 // all match. |id| must either be a pointer or an integer value up to 64 bits. |
| 822 // If it's a pointer, the bits will be xored with a hash of the process ID so | 814 // If it's a pointer, the bits will be xored with a hash of the process ID so |
| 823 // that the same pointer on two different processes will not collide. | 815 // that the same pointer on two different processes will not collide. |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1049 | 1041 |
| 1050 // Enum reflecting the scope of an INSTANT event. Must fit within | 1042 // Enum reflecting the scope of an INSTANT event. Must fit within |
| 1051 // TRACE_EVENT_FLAG_SCOPE_MASK. | 1043 // TRACE_EVENT_FLAG_SCOPE_MASK. |
| 1052 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) | 1044 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) |
| 1053 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) | 1045 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) |
| 1054 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) | 1046 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) |
| 1055 | 1047 |
| 1056 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') | 1048 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') |
| 1057 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') | 1049 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') |
| 1058 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') | 1050 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') |
| OLD | NEW |