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

Unified Diff: base/run_loop.cc

Issue 445413003: Creating a framework for suppressing pollution of the profiler data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing unit tests again. Created 6 years, 3 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 | « base/profiler/tracked_time_unittest.cc ('k') | base/threading/sequenced_worker_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/run_loop.cc
diff --git a/base/run_loop.cc b/base/run_loop.cc
index 8344aa41b1631f6946e242e9ef0efbafdee23279..e92e110f82149c39ff9e9dfe2cf6552389028c12 100644
--- a/base/run_loop.cc
+++ b/base/run_loop.cc
@@ -5,6 +5,7 @@
#include "base/run_loop.h"
#include "base/bind.h"
+#include "base/tracked_objects.h"
#if defined(OS_WIN)
#include "base/message_loop/message_pump_dispatcher.h"
@@ -46,7 +47,13 @@ RunLoop::~RunLoop() {
void RunLoop::Run() {
if (!BeforeRun())
return;
+
+ // Use task stopwatch to exclude the loop run time from the current task, if
+ // any.
+ tracked_objects::TaskStopwatch stopwatch;
loop_->RunHandler();
+ stopwatch.Stop();
+
AfterRun();
}
« no previous file with comments | « base/profiler/tracked_time_unittest.cc ('k') | base/threading/sequenced_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698