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

Unified Diff: base/message_loop/message_loop.cc

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, cleanup Created 7 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 side-by-side diff with in-line comments
Download patch
Index: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 0364a52710c10696bd74394153d4e6c28307b436..311ddd4560c015ecc5d3317031315f12189a4381 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -458,9 +458,14 @@ bool MessageLoop::ProcessNextDelayedNonNestableTask() {
void MessageLoop::RunTask(const PendingTask& pending_task) {
TRACE_EVENT_FLOW_END0("task", "MessageLoop::PostTask",
TRACE_ID_MANGLE(GetTaskTraceID(pending_task, this)));
- TRACE_EVENT2("task", "MessageLoop::RunTask",
- "src_file", pending_task.posted_from.file_name(),
- "src_func", pending_task.posted_from.function_name());
+ // RunTask has special memory tracing needs. The file name where the task
+ // was posted is much more useful than "MessageLoop::RunTask" so we invoke
nduca 2013/06/20 20:09:29 lets pull this out to another followup patch.. its
James Cook 2013/06/29 00:02:42 OK. I pulled this section out.
+ // the tracing macros separately with different strings.
+ // TODO(jamescook): Use TRACE_MEMORY2 here when it is implemented.
+ TRACE_MEMORY("task", pending_task.posted_from.file_name());
+ INTERNAL_TRACE_EVENT_ADD_SCOPED("task", "MessageLoop::RunTask",
dsinclair 2013/06/18 15:30:15 This makes me sad. If we're going to be using it o
James Cook 2013/06/29 00:02:42 Yeah. The only reason this was here was to support
+ "src_file", pending_task.posted_from.file_name(),
+ "src_func", pending_task.posted_from.function_name());
DCHECK(nestable_tasks_allowed_);
// Execute the task and assume the worst: It is probably not reentrant.
nestable_tasks_allowed_ = false;

Powered by Google App Engine
This is Rietveld 408576698