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

Side by Side Diff: content/renderer/scheduler/task_queue_manager.cc

Issue 846663002: Use ThreadData::Now() for TrackingInfo::time_posted initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « base/tracking_info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/scheduler/task_queue_manager.h" 5 #include "content/renderer/scheduler/task_queue_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/debug/trace_event_argument.h" 9 #include "base/debug/trace_event_argument.h"
10 #include "content/renderer/scheduler/task_queue_selector.h" 10 #include "content/renderer/scheduler/task_queue_selector.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // static 225 // static
226 void TaskQueue::TaskAsValueInto(const base::PendingTask& task, 226 void TaskQueue::TaskAsValueInto(const base::PendingTask& task,
227 base::debug::TracedValue* state) { 227 base::debug::TracedValue* state) {
228 state->BeginDictionary(); 228 state->BeginDictionary();
229 state->SetString("posted_from", task.posted_from.ToString()); 229 state->SetString("posted_from", task.posted_from.ToString());
230 state->SetInteger("sequence_num", task.sequence_num); 230 state->SetInteger("sequence_num", task.sequence_num);
231 state->SetBoolean("nestable", task.nestable); 231 state->SetBoolean("nestable", task.nestable);
232 state->SetBoolean("is_high_res", task.is_high_res); 232 state->SetBoolean("is_high_res", task.is_high_res);
233 state->SetDouble( 233 state->SetDouble(
234 "time_posted", 234 "time_posted",
235 (task.time_posted - base::TimeTicks()).InMicroseconds() / 1000.0L); 235 (task.time_posted - tracked_objects::TrackedTime()).InMilliseconds());
jdduke (slow) 2015/01/09 16:45:46 Sami, should we consider removing this entry entir
Sami 2015/01/09 16:48:32 Yes, kill it. We can reconstruct it from trace eve
jdduke (slow) 2015/01/09 16:54:22 Done.
236 state->SetDouble( 236 state->SetDouble(
237 "delayed_run_time", 237 "delayed_run_time",
238 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L); 238 (task.delayed_run_time - base::TimeTicks()).InMicroseconds() / 1000.0L);
239 state->EndDictionary(); 239 state->EndDictionary();
240 } 240 }
241 241
242 } // namespace internal 242 } // namespace internal
243 243
244 TaskQueueManager::TaskQueueManager( 244 TaskQueueManager::TaskQueueManager(
245 size_t task_queue_count, 245 size_t task_queue_count,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 state->EndArray(); 403 state->EndArray();
404 state->BeginDictionary("selector"); 404 state->BeginDictionary("selector");
405 selector_->AsValueInto(state.get()); 405 selector_->AsValueInto(state.get());
406 state->EndDictionary(); 406 state->EndDictionary();
407 if (should_run) 407 if (should_run)
408 state->SetInteger("selected_queue", selected_queue); 408 state->SetInteger("selected_queue", selected_queue);
409 return state; 409 return state;
410 } 410 }
411 411
412 } // namespace content 412 } // namespace content
OLDNEW
« no previous file with comments | « base/tracking_info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698