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

Side by Side Diff: components/scheduler/renderer/renderer_scheduler_impl.cc

Issue 1811023002: scheduler: Emit a normal instant trace event when blocking tasks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | 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 "components/scheduler/renderer/renderer_scheduler_impl.h" 5 #include "components/scheduler/renderer/renderer_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 for (auto& web_view_scheduler : MainThreadOnly().web_view_schedulers_) 1162 for (auto& web_view_scheduler : MainThreadOnly().web_view_schedulers_)
1163 web_view_scheduler->AddConsoleWarning(message); 1163 web_view_scheduler->AddConsoleWarning(message);
1164 } 1164 }
1165 1165
1166 void RendererSchedulerImpl::OnTriedToExecuteBlockedTask( 1166 void RendererSchedulerImpl::OnTriedToExecuteBlockedTask(
1167 const TaskQueue& queue, 1167 const TaskQueue& queue,
1168 const base::PendingTask& task) { 1168 const base::PendingTask& task) {
1169 if (!MainThreadOnly().have_reported_blocking_intervention_in_current_policy) { 1169 if (!MainThreadOnly().have_reported_blocking_intervention_in_current_policy) {
1170 MainThreadOnly().have_reported_blocking_intervention_in_current_policy = 1170 MainThreadOnly().have_reported_blocking_intervention_in_current_policy =
1171 true; 1171 true;
1172 TRACE_TASK_EXECUTION("RendererSchedulerImpl::TaskBlocked", task); 1172 TRACE_EVENT_INSTANT0("renderer.scheduler",
1173 "RendererSchedulerImpl::TaskBlocked",
1174 TRACE_EVENT_SCOPE_THREAD);
1173 } 1175 }
1174 1176
1175 if (!MainThreadOnly().have_reported_blocking_intervention_since_navigation) { 1177 if (!MainThreadOnly().have_reported_blocking_intervention_since_navigation) {
1176 { 1178 {
1177 base::AutoLock lock(any_thread_lock_); 1179 base::AutoLock lock(any_thread_lock_);
1178 if (!AnyThread().have_seen_touchstart) 1180 if (!AnyThread().have_seen_touchstart)
1179 return; 1181 return;
1180 } 1182 }
1181 MainThreadOnly().have_reported_blocking_intervention_since_navigation = 1183 MainThreadOnly().have_reported_blocking_intervention_since_navigation =
1182 true; 1184 true;
1183 BroadcastConsoleWarning( 1185 BroadcastConsoleWarning(
1184 "Deferred long-running timer task(s) to improve scrolling smoothness. " 1186 "Deferred long-running timer task(s) to improve scrolling smoothness. "
1185 "See crbug.com/574343."); 1187 "See crbug.com/574343.");
1186 } 1188 }
1187 } 1189 }
1188 1190
1189 } // namespace scheduler 1191 } // namespace scheduler
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698