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

Unified Diff: base/debug/task_annotator.cc

Issue 1237283006: Extract trace from TaskAnnotator::RunTask to its call sites (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/debug/task_annotator.cc
diff --git a/base/debug/task_annotator.cc b/base/debug/task_annotator.cc
index 19df8cb39e5129b9c02987f919b8bdb7cc1d7760..b74d390938d75867af4f52d379774ae6fe265667 100644
--- a/base/debug/task_annotator.cc
+++ b/base/debug/task_annotator.cc
@@ -26,7 +26,6 @@ void TaskAnnotator::DidQueueTask(const char* queue_function,
}
void TaskAnnotator::RunTask(const char* queue_function,
- const char* run_function,
const PendingTask& pending_task) {
tracked_objects::TaskStopwatch stopwatch;
stopwatch.Start();
@@ -39,18 +38,6 @@ void TaskAnnotator::RunTask(const char* queue_function,
"queue_duration",
queue_duration.InMilliseconds());
- // When tracing memory for posted tasks it's more valuable to attribute the
Sami 2015/07/15 17:44:00 Drive-by: would it work if we split this into TRAC
dsinclair 2015/07/15 17:58:28 You'd need to use an async event or something othe
Sami 2015/07/15 18:06:52 Hmm, I thought the idea here was to include those
- // memory allocations to the source function than generically to the task
- // runner.
- TRACE_EVENT_WITH_MEMORY_TAG2(
- "toplevel",
- run_function,
- pending_task.posted_from.function_name(), // Name for memory tracking.
- "src_file",
- pending_task.posted_from.file_name(),
- "src_func",
- pending_task.posted_from.function_name());
-
// Before running the task, store the program counter where it was posted
// and deliberately alias it to ensure it is on the stack if the task
// crashes. Be careful not to assume that the variable itself will have the

Powered by Google App Engine
This is Rietveld 408576698