| 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 timestamp) \ | 605 timestamp) \ |
| 606 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 606 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 607 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ | 607 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ |
| 608 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) | 608 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) |
| 609 #define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1( \ | 609 #define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1( \ |
| 610 category_group, name, id, timestamp, arg1_name, arg1_val) \ | 610 category_group, name, id, timestamp, arg1_name, arg1_val) \ |
| 611 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 611 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 612 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ | 612 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ |
| 613 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ | 613 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ |
| 614 arg1_name, arg1_val) | 614 arg1_name, arg1_val) |
| 615 #define TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP2(category_group, name, id, \ |
| 616 timestamp, arg1_name, \ |
| 617 arg1_val, arg2_name, arg2_val) \ |
| 618 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 619 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ |
| 620 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ |
| 621 arg1_name, arg1_val, arg2_name, arg2_val) |
| 615 #define TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \ | 622 #define TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, id, \ |
| 616 timestamp) \ | 623 timestamp) \ |
| 617 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 624 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 618 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ | 625 TRACE_EVENT_PHASE_ASYNC_BEGIN, category_group, name, id, \ |
| 619 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) | 626 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_COPY) |
| 620 | 627 |
| 621 // Records a single ASYNC_STEP_INTO event for |step| immediately. If the | 628 // Records a single ASYNC_STEP_INTO event for |step| immediately. If the |
| 622 // category is not enabled, then this does nothing. The |name| and |id| must | 629 // category is not enabled, then this does nothing. The |name| and |id| must |
| 623 // match the ASYNC_BEGIN event above. The |step| param identifies this step | 630 // match the ASYNC_BEGIN event above. The |step| param identifies this step |
| 624 // within the async event. This should be called at the beginning of the next | 631 // within the async event. This should be called at the beginning of the next |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 timestamp) \ | 701 timestamp) \ |
| 695 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 702 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 696 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ | 703 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ |
| 697 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) | 704 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE) |
| 698 #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP1(category_group, name, id, \ | 705 #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP1(category_group, name, id, \ |
| 699 timestamp, arg1_name, arg1_val) \ | 706 timestamp, arg1_name, arg1_val) \ |
| 700 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ | 707 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 701 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ | 708 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ |
| 702 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ | 709 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ |
| 703 arg1_name, arg1_val) | 710 arg1_name, arg1_val) |
| 711 #define TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP2(category_group, name, id, \ |
| 712 timestamp, arg1_name, arg1_val, \ |
| 713 arg2_name, arg2_val) \ |
| 714 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 715 TRACE_EVENT_PHASE_ASYNC_END, category_group, name, id, \ |
| 716 TRACE_EVENT_API_CURRENT_THREAD_ID, timestamp, TRACE_EVENT_FLAG_NONE, \ |
| 717 arg1_name, arg1_val, arg2_name, arg2_val) |
| 704 | 718 |
| 705 // NESTABLE_ASYNC_* APIs are used to describe an async operation, which can | 719 // NESTABLE_ASYNC_* APIs are used to describe an async operation, which can |
| 706 // be nested within a NESTABLE_ASYNC event and/or have inner NESTABLE_ASYNC | 720 // be nested within a NESTABLE_ASYNC event and/or have inner NESTABLE_ASYNC |
| 707 // events. | 721 // events. |
| 708 // - category and name strings must have application lifetime (statics or | 722 // - category and name strings must have application lifetime (statics or |
| 709 // literals). They may not include " chars. | 723 // literals). They may not include " chars. |
| 710 // - A pair of NESTABLE_ASYNC_BEGIN event and NESTABLE_ASYNC_END event is | 724 // - A pair of NESTABLE_ASYNC_BEGIN event and NESTABLE_ASYNC_END event is |
| 711 // considered as a match if their category_group, name and id all match. | 725 // considered as a match if their category_group, name and id all match. |
| 712 // - |id| must either be a pointer or an integer value up to 64 bits. | 726 // - |id| must either be a pointer or an integer value up to 64 bits. |
| 713 // If it's a pointer, the bits will be xored with a hash of the process ID so | 727 // If it's a pointer, the bits will be xored with a hash of the process ID so |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 | 1098 |
| 1085 // Enum reflecting the scope of an INSTANT event. Must fit within | 1099 // Enum reflecting the scope of an INSTANT event. Must fit within |
| 1086 // TRACE_EVENT_FLAG_SCOPE_MASK. | 1100 // TRACE_EVENT_FLAG_SCOPE_MASK. |
| 1087 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) | 1101 #define TRACE_EVENT_SCOPE_GLOBAL (static_cast<unsigned char>(0 << 3)) |
| 1088 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) | 1102 #define TRACE_EVENT_SCOPE_PROCESS (static_cast<unsigned char>(1 << 3)) |
| 1089 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) | 1103 #define TRACE_EVENT_SCOPE_THREAD (static_cast<unsigned char>(2 << 3)) |
| 1090 | 1104 |
| 1091 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') | 1105 #define TRACE_EVENT_SCOPE_NAME_GLOBAL ('g') |
| 1092 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') | 1106 #define TRACE_EVENT_SCOPE_NAME_PROCESS ('p') |
| 1093 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') | 1107 #define TRACE_EVENT_SCOPE_NAME_THREAD ('t') |
| OLD | NEW |