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

Side by Side Diff: base/message_loop/incoming_task_queue.cc

Issue 148173011: Make flow event traces disabled-by-default, and rename "ipc" and "task" categories to "toplevel" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace "ipc" and "task" categories with toplevel. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/trace_event_memory_unittest.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop/incoming_task_queue.h" 5 #include "base/message_loop/incoming_task_queue.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (!message_loop_) { 123 if (!message_loop_) {
124 pending_task->task.Reset(); 124 pending_task->task.Reset();
125 return false; 125 return false;
126 } 126 }
127 127
128 // Initialize the sequence number. The sequence number is used for delayed 128 // Initialize the sequence number. The sequence number is used for delayed
129 // tasks (to faciliate FIFO sorting when two tasks have the same 129 // tasks (to faciliate FIFO sorting when two tasks have the same
130 // delayed_run_time value) and for identifying the task in about:tracing. 130 // delayed_run_time value) and for identifying the task in about:tracing.
131 pending_task->sequence_num = next_sequence_num_++; 131 pending_task->sequence_num = next_sequence_num_++;
132 132
133 TRACE_EVENT_FLOW_BEGIN0("task", "MessageLoop::PostTask", 133 TRACE_EVENT_FLOW_BEGIN0(TRACE_DISABLED_BY_DEFAULT("toplevel.flow"),
134 "MessageLoop::PostTask",
134 TRACE_ID_MANGLE(message_loop_->GetTaskTraceID(*pending_task))); 135 TRACE_ID_MANGLE(message_loop_->GetTaskTraceID(*pending_task)));
135 136
136 bool was_empty = incoming_queue_.empty(); 137 bool was_empty = incoming_queue_.empty();
137 incoming_queue_.push(*pending_task); 138 incoming_queue_.push(*pending_task);
138 pending_task->task.Reset(); 139 pending_task->task.Reset();
139 140
140 // Wake up the pump. 141 // Wake up the pump.
141 message_loop_->ScheduleWork(was_empty); 142 message_loop_->ScheduleWork(was_empty);
142 143
143 return true; 144 return true;
144 } 145 }
145 146
146 } // namespace internal 147 } // namespace internal
147 } // namespace base 148 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/trace_event_memory_unittest.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698