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

Side by Side Diff: content/renderer/render_widget.cc

Issue 855553002: Add more trace events to "benchmark" category (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add tracing to ThreadProxy::DidSwapBuffersCompleteOnImplThread 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 | « content/renderer/input/input_handler_proxy.cc ('k') | ui/events/latency_info.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 } 1060 }
1061 #endif 1061 #endif
1062 1062
1063 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_, 1063 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_,
1064 &latency_info); 1064 &latency_info);
1065 1065
1066 base::TimeTicks start_time; 1066 base::TimeTicks start_time;
1067 if (base::TimeTicks::IsHighResNowFastAndReliable()) 1067 if (base::TimeTicks::IsHighResNowFastAndReliable())
1068 start_time = base::TimeTicks::HighResNow(); 1068 start_time = base::TimeTicks::HighResNow();
1069 1069
1070 TRACE_EVENT1("renderer", "RenderWidget::OnHandleInputEvent", 1070 TRACE_EVENT1("renderer,benchmark", "RenderWidget::OnHandleInputEvent",
1071 "event", WebInputEventTraits::GetName(input_event->type)); 1071 "event", WebInputEventTraits::GetName(input_event->type));
1072 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent"); 1072 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent");
1073 TRACE_EVENT_FLOW_STEP0( 1073 TRACE_EVENT_FLOW_STEP0(
1074 "input", 1074 "input,benchmark",
1075 "LatencyInfo.Flow", 1075 "LatencyInfo.Flow",
1076 TRACE_ID_DONT_MANGLE(latency_info.trace_id), 1076 TRACE_ID_DONT_MANGLE(latency_info.trace_id),
1077 "HanldeInputEventMain"); 1077 "HanldeInputEventMain");
1078 1078
1079 // If we don't have a high res timer, these metrics won't be accurate enough 1079 // If we don't have a high res timer, these metrics won't be accurate enough
1080 // to be worth collecting. Note that this does introduce some sampling bias. 1080 // to be worth collecting. Note that this does introduce some sampling bias.
1081 if (!start_time.is_null()) 1081 if (!start_time.is_null())
1082 LogInputEventLatencyUma(*input_event, start_time); 1082 LogInputEventLatencyUma(*input_event, start_time);
1083 1083
1084 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; 1084 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2373 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2374 video_hole_frames_.AddObserver(frame); 2374 video_hole_frames_.AddObserver(frame);
2375 } 2375 }
2376 2376
2377 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2377 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2378 video_hole_frames_.RemoveObserver(frame); 2378 video_hole_frames_.RemoveObserver(frame);
2379 } 2379 }
2380 #endif // defined(VIDEO_HOLE) 2380 #endif // defined(VIDEO_HOLE)
2381 2381
2382 } // namespace content 2382 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_proxy.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698