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

Unified Diff: base/message_loop/message_loop.cc

Issue 171013006: Telemetry: Use mimimum tracing for timeline benchmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/perf/metrics/timeline.py » ('j') | tools/perf/metrics/timeline.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 8f6c9d8cb6f0d0901d1a6d7fdb1d04b871adc6a9..6e33b2df34dc7ce28bcb5e133d3ad4bf31d4e36c 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -412,6 +412,12 @@ bool MessageLoop::ProcessNextDelayedNonNestableTask() {
}
void MessageLoop::RunTask(const PendingTask& pending_task) {
+ // For absolutely minimal tracing, "poll_cpu" captures _everything_
+ // on a typical message loop thread, so long as the thread runs semi-regular
+ // tasks (for sufficient measurement granularity).
+ TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("poll_cpu"), "Poll");
+ TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("poll_cpu"), "Poll");
+
tracked_objects::TrackedTime start_time =
tracked_objects::ThreadData::NowForStartOfRun(pending_task.birth_tally);
« no previous file with comments | « no previous file | tools/perf/metrics/timeline.py » ('j') | tools/perf/metrics/timeline.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698