Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |