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

Unified Diff: base/threading/worker_pool_posix.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: (presumably) last round of jar@'s comments 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
Index: base/threading/worker_pool_posix.cc
diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc
index f00d7994d017e7559c2761eaed90401ed35ed743..167d20f065d50c77849a98bacdce95f0b5e326ee 100644
--- a/base/threading/worker_pool_posix.cc
+++ b/base/threading/worker_pool_posix.cc
@@ -95,14 +95,14 @@ void WorkerThread::ThreadMain() {
"src_file", pending_task.posted_from.file_name(),
"src_func", pending_task.posted_from.function_name());
- TrackedTime start_time =
- tracked_objects::ThreadData::NowForStartOfRun(pending_task.birth_tally);
-
+ tracked_objects::ThreadData::PrepareForStartOfRun(pending_task.birth_tally);
+ tracked_objects::TaskStopwatch stopwatch;
pending_task.task.Run();
+ stopwatch.Stop();
tracked_objects::ThreadData::TallyRunOnWorkerThreadIfTracking(
pending_task.birth_tally, TrackedTime(pending_task.time_posted),
- start_time, tracked_objects::ThreadData::NowForEndOfRun());
+ stopwatch);
}
// The WorkerThread is non-joinable, so it deletes itself.

Powered by Google App Engine
This is Rietveld 408576698