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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 category_group, name, id, \ | 753 category_group, name, id, \ |
754 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ | 754 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ |
755 arg1_name, arg1_val, arg2_name, arg2_val) | 755 arg1_name, arg1_val, arg2_name, arg2_val) |
756 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2(category_group, name, \ | 756 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2(category_group, name, \ |
757 id, arg1_name, arg1_val, arg2_name, arg2_val) \ | 757 id, arg1_name, arg1_val, arg2_name, arg2_val) \ |
758 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ | 758 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ |
759 category_group, name, id, \ | 759 category_group, name, id, \ |
760 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ | 760 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \ |
761 arg1_name, arg1_val, arg2_name, arg2_val) | 761 arg1_name, arg1_val, arg2_name, arg2_val) |
762 | 762 |
| 763 // Similar to TRACE_EVENT_NESTABLE_ASYNC_{BEGIN,END}x but with a custom |
| 764 // |timestamp| provided. |
| 765 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, \ |
| 766 id, timestamp) \ |
| 767 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 768 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \ |
| 769 static_cast<int>(base::PlatformThread::CurrentId()), timestamp, \ |
| 770 TRACE_EVENT_FLAG_NONE) |
| 771 |
| 772 #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP0(category_group, name, \ |
| 773 id, timestamp) \ |
| 774 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \ |
| 775 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \ |
| 776 static_cast<int>(base::PlatformThread::CurrentId()), timestamp, \ |
| 777 TRACE_EVENT_FLAG_NONE) |
| 778 |
763 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, | 779 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, |
764 // with 2 associated arguments. If the category is not enabled, then this | 780 // with 2 associated arguments. If the category is not enabled, then this |
765 // does nothing. | 781 // does nothing. |
766 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ | 782 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ |
767 arg1_name, arg1_val, arg2_name, arg2_val) \ | 783 arg1_name, arg1_val, arg2_name, arg2_val) \ |
768 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ | 784 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ |
769 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ | 785 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ |
770 arg2_name, arg2_val) | 786 arg2_name, arg2_val) |
771 | 787 |
772 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 | 788 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 const char* name_; | 1708 const char* name_; |
1693 IDType id_; | 1709 IDType id_; |
1694 | 1710 |
1695 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); | 1711 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); |
1696 }; | 1712 }; |
1697 | 1713 |
1698 } // namespace trace_event | 1714 } // namespace trace_event |
1699 } // namespace base | 1715 } // namespace base |
1700 | 1716 |
1701 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ | 1717 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ |
OLD | NEW |