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

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

Issue 874283004: Reland: Add more trace events to "benchmark" category (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 | « 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 } 1098 }
1099 #endif 1099 #endif
1100 1100
1101 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_, 1101 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_,
1102 &latency_info); 1102 &latency_info);
1103 1103
1104 base::TimeTicks start_time; 1104 base::TimeTicks start_time;
1105 if (base::TimeTicks::IsHighResNowFastAndReliable()) 1105 if (base::TimeTicks::IsHighResNowFastAndReliable())
1106 start_time = base::TimeTicks::HighResNow(); 1106 start_time = base::TimeTicks::HighResNow();
1107 1107
1108 TRACE_EVENT1("renderer", "RenderWidget::OnHandleInputEvent", 1108 TRACE_EVENT1("renderer,benchmark", "RenderWidget::OnHandleInputEvent",
1109 "event", WebInputEventTraits::GetName(input_event->type)); 1109 "event", WebInputEventTraits::GetName(input_event->type));
1110 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent"); 1110 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent");
1111 TRACE_EVENT_FLOW_STEP0( 1111 TRACE_EVENT_FLOW_STEP0(
1112 "input", 1112 "input,benchmark",
1113 "LatencyInfo.Flow", 1113 "LatencyInfo.Flow",
1114 TRACE_ID_DONT_MANGLE(latency_info.trace_id), 1114 TRACE_ID_DONT_MANGLE(latency_info.trace_id),
1115 "HanldeInputEventMain"); 1115 "HanldeInputEventMain");
1116 1116
1117 // If we don't have a high res timer, these metrics won't be accurate enough 1117 // If we don't have a high res timer, these metrics won't be accurate enough
1118 // to be worth collecting. Note that this does introduce some sampling bias. 1118 // to be worth collecting. Note that this does introduce some sampling bias.
1119 if (!start_time.is_null()) 1119 if (!start_time.is_null())
1120 LogInputEventLatencyUma(*input_event, start_time); 1120 LogInputEventLatencyUma(*input_event, start_time);
1121 1121
1122 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; 1122 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2428 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2429 video_hole_frames_.AddObserver(frame); 2429 video_hole_frames_.AddObserver(frame);
2430 } 2430 }
2431 2431
2432 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2432 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2433 video_hole_frames_.RemoveObserver(frame); 2433 video_hole_frames_.RemoveObserver(frame);
2434 } 2434 }
2435 #endif // defined(VIDEO_HOLE) 2435 #endif // defined(VIDEO_HOLE)
2436 2436
2437 } // namespace content 2437 } // 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