| Index: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
|
| diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
|
| index 25376e87f14eab36a4df8cfeac668a9928540ad9..bb860a3a8588ca16be005edf6aea31b1c05affe8 100644
|
| --- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
|
| +++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
|
| @@ -1321,8 +1321,6 @@ RendererSchedulerImpl::AsValueLocked(base::TimeTicks optional_now) const {
|
| MainThreadOnly().has_visible_render_widget_with_touch_handler);
|
| state->SetString("current_use_case",
|
| UseCaseToString(MainThreadOnly().current_use_case));
|
| - state->SetString("rail_mode",
|
| - RAILModeToString(MainThreadOnly().current_policy.rail_mode));
|
| state->SetBoolean("loading_tasks_seem_expensive",
|
| MainThreadOnly().loading_tasks_seem_expensive);
|
| state->SetBoolean("timer_tasks_seem_expensive",
|
| @@ -1381,6 +1379,10 @@ RendererSchedulerImpl::AsValueLocked(base::TimeTicks optional_now) const {
|
| .InMillisecondsF());
|
| state->SetBoolean("is_audio_playing", MainThreadOnly().is_audio_playing);
|
|
|
| + state->BeginDictionary("policy");
|
| + MainThreadOnly().current_policy.AsValueInto(state.get());
|
| + state->EndDictionary();
|
| +
|
| // TODO(skyostil): Can we somehow trace how accurate these estimates were?
|
| state->SetDouble(
|
| "longest_jank_free_task_duration",
|
| @@ -1408,6 +1410,36 @@ RendererSchedulerImpl::AsValueLocked(base::TimeTicks optional_now) const {
|
| return std::move(state);
|
| }
|
|
|
| +void RendererSchedulerImpl::TaskQueuePolicy::AsValueInto(
|
| + base::trace_event::TracedValue* state) const {
|
| + state->SetBoolean("is_enabled", is_enabled);
|
| + state->SetString("priority", TaskQueue::PriorityToString(priority));
|
| + state->SetString("time_domain_type",
|
| + TimeDomainTypeToString(time_domain_type));
|
| +}
|
| +
|
| +void RendererSchedulerImpl::Policy::AsValueInto(
|
| + base::trace_event::TracedValue* state) const {
|
| + state->BeginDictionary("compositor_queue_policy");
|
| + compositor_queue_policy.AsValueInto(state);
|
| + state->EndDictionary();
|
| +
|
| + state->BeginDictionary("loading_queue_policy");
|
| + loading_queue_policy.AsValueInto(state);
|
| + state->EndDictionary();
|
| +
|
| + state->BeginDictionary("timer_queue_policy");
|
| + timer_queue_policy.AsValueInto(state);
|
| + state->EndDictionary();
|
| +
|
| + state->BeginDictionary("default_queue_policy");
|
| + default_queue_policy.AsValueInto(state);
|
| + state->EndDictionary();
|
| +
|
| + state->SetString("rail_mode", RAILModeToString(rail_mode));
|
| + state->SetBoolean("should_disable_throttling", should_disable_throttling);
|
| +}
|
| +
|
| void RendererSchedulerImpl::OnIdlePeriodStarted() {
|
| base::AutoLock lock(any_thread_lock_);
|
| AnyThread().in_idle_period = true;
|
| @@ -1709,5 +1741,21 @@ const char* RendererSchedulerImpl::RAILModeToString(v8::RAILMode rail_mode) {
|
| }
|
| }
|
|
|
| +// static
|
| +const char* RendererSchedulerImpl::TimeDomainTypeToString(
|
| + TimeDomainType domain_type) {
|
| + switch (domain_type) {
|
| + case TimeDomainType::REAL:
|
| + return "real";
|
| + case TimeDomainType::THROTTLED:
|
| + return "throttled";
|
| + case TimeDomainType::VIRTUAL:
|
| + return "virtual";
|
| + default:
|
| + NOTREACHED();
|
| + return nullptr;
|
| + }
|
| +}
|
| +
|
| } // namespace scheduler
|
| } // namespace blink
|
|
|