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

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

Issue 1151353003: [scheduler]: Avoid waking up the scheduler to end long idle periods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@end_idle_sync_2
Patch Set: Fix tests and update for review. Created 5 years, 6 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #define TRACE_EVENT_NESTABLE_ASYNC_BEGIN_WITH_TIMESTAMP0(category_group, name, \
Primiano Tucci (use gerrit) 2015/06/01 17:20:04 Ok there seems to be enough precedent for this. C
rmcilroy 2015/06/01 19:12:43 Done.
764 id, timestamp) \
765 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
766 TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN, category_group, name, id, \
767 static_cast<int>(base::PlatformThread::CurrentId()), timestamp, \
768 TRACE_EVENT_FLAG_NONE)
769
770 #define TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP0(category_group, name, \
771 id, timestamp) \
772 INTERNAL_TRACE_EVENT_ADD_WITH_ID_TID_AND_TIMESTAMP( \
773 TRACE_EVENT_PHASE_NESTABLE_ASYNC_END, category_group, name, id, \
774 static_cast<int>(base::PlatformThread::CurrentId()), timestamp, \
775 TRACE_EVENT_FLAG_NONE)
776
763 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately, 777 // Records a single NESTABLE_ASYNC_INSTANT event called "name" immediately,
764 // with 2 associated arguments. If the category is not enabled, then this 778 // with 2 associated arguments. If the category is not enabled, then this
765 // does nothing. 779 // does nothing.
766 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \ 780 #define TRACE_EVENT_NESTABLE_ASYNC_INSTANT2(category_group, name, id, \
767 arg1_name, arg1_val, arg2_name, arg2_val) \ 781 arg1_name, arg1_val, arg2_name, arg2_val) \
768 INTERNAL_TRACE_EVENT_ADD_WITH_ID(TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, \ 782 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, \ 783 category_group, name, id, TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, \
770 arg2_name, arg2_val) 784 arg2_name, arg2_val)
771 785
772 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2 786 // Records a single FLOW_BEGIN event called "name" immediately, with 0, 1 or 2
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 const char* name_; 1692 const char* name_;
1679 IDType id_; 1693 IDType id_;
1680 1694
1681 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject); 1695 DISALLOW_COPY_AND_ASSIGN(TraceScopedTrackableObject);
1682 }; 1696 };
1683 1697
1684 } // namespace trace_event 1698 } // namespace trace_event
1685 } // namespace base 1699 } // namespace base
1686 1700
1687 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_ 1701 #endif // BASE_TRACE_EVENT_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | components/scheduler/child/idle_helper.h » ('j') | components/scheduler/child/idle_helper.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698