Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: base/trace_event/trace_event.h

Issue 1128733002: Update from https://crrev.com/328418 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 2
706 // associated arguments. If the category is not enabled, then this does nothing. 706 // associated arguments. If the category is not enabled, then this does nothing.
707 #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, \
708 arg1_val, arg2_name, arg2_val) \ 708 arg1_val, arg2_name, arg2_val) \
709 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, \
710 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, \
711 arg2_name, arg2_val) 711 arg2_name, arg2_val)
712 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_BEGIN_WITH_TTS2(category_group, name, \
713 id, arg1_name, arg1_val, arg2_name, arg2_val) \
714 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, \
715 category_group, name, id, \
716 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \
717 arg1_name, arg1_val, arg2_name, arg2_val)
718
712 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 2 719 // Records a single NESTABLE_ASYNC_END event called "name" immediately, with 2
713 // associated arguments. If the category is not enabled, then this does nothing. 720 // associated arguments. If the category is not enabled, then this does nothing.
714 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \ 721 #define TRACE_EVENT_NESTABLE_ASYNC_END2(category_group, name, id, arg1_name, \
715 arg1_val, arg2_name, arg2_val) \ 722 arg1_val, arg2_name, arg2_val) \
716 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \ 723 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
717 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ 724 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
718 arg2_name, arg2_val) 725 arg2_name, arg2_val)
726 #define TRACE_EVENT_COPY_NESTABLE_ASYNC_END_WITH_TTS2(category_group, name, \
727 id, arg1_name, arg1_val, arg2_name, arg2_val) \
728 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, \
729 category_group, name, id, \
730 TRACE_EVENT_FLAG_ASYNC_TTS | TRACE_EVENT_FLAG_COPY, \
731 arg1_name, arg1_val, arg2_name, arg2_val)
732
719 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, 733 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately,
720 // with 2 associated arguments. If the category is not enabled, then this 734 // with 2 associated arguments. If the category is not enabled, then this
721 // does nothing. 735 // does nothing.
722 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ 736 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \
723 arg1_name, arg1_val, arg2_name, arg2_val) \ 737 arg1_name, arg1_val, arg2_name, arg2_val) \
724 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ 738 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \
725 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \ 739 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
726 arg2_name, arg2_val) 740 arg2_name, arg2_val)
727 741
728 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 742 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v') 1088 #define TRACE_EVENT_PHASE_MEMORY_DUMP ('v')
1075 1089
1076 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. 1090 // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT.
1077 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) 1091 #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0))
1078 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) 1092 #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0))
1079 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) 1093 #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1))
1080 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) 1094 #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2))
1081 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 3)) 1095 #define TRACE_EVENT_FLAG_SCOPE_OFFSET (static_cast<unsigned char>(1 << 3))
1082 #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast<unsigned char>(1 << 4)) 1096 #define TRACE_EVENT_FLAG_SCOPE_EXTRA (static_cast<unsigned char>(1 << 4))
1083 #define TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP (static_cast<unsigned char>(1 << 5)) 1097 #define TRACE_EVENT_FLAG_EXPLICIT_TIMESTAMP (static_cast<unsigned char>(1 << 5))
1098 #define TRACE_EVENT_FLAG_ASYNC_TTS (static_cast<unsigned char>(1 << 6))
1084 1099
1085 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \ 1100 #define TRACE_EVENT_FLAG_SCOPE_MASK (static_cast<unsigned char>( \
1086 TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA)) 1101 TRACE_EVENT_FLAG_SCOPE_OFFSET | TRACE_EVENT_FLAG_SCOPE_EXTRA))
1087 1102
1088 // Type values for identifying types in the TraceValue union. 1103 // Type values for identifying types in the TraceValue union.
1089 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) 1104 #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1))
1090 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) 1105 #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2))
1091 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) 1106 #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3))
1092 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) 1107 #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4))
1093 #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5)) 1108 #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5))
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 const char* name_; 1648 const char* name_;
1634 IDType id_; 1649 IDType id_;
1635 1650
1636 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1651 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1637 }; 1652 };
1638 1653
1639 } // namespace trace_event 1654 } // namespace trace_event
1640 } // namespace base 1655 } // namespace base
1641 1656
1642 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1657 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « base/trace_event/process_memory_totals_dump_provider_unittest.cc ('k') | base/trace_event/trace_event.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698