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

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: fix typo 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
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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 } 1056 }
1057 #endif 1057 #endif
1058 1058
1059 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_, 1059 base::AutoReset<const ui::LatencyInfo*> resetter(&current_event_latency_info_,
1060 &latency_info); 1060 &latency_info);
1061 1061
1062 base::TimeTicks start_time; 1062 base::TimeTicks start_time;
1063 if (base::TimeTicks::IsHighResNowFastAndReliable()) 1063 if (base::TimeTicks::IsHighResNowFastAndReliable())
1064 start_time = base::TimeTicks::HighResNow(); 1064 start_time = base::TimeTicks::HighResNow();
1065 1065
1066 TRACE_EVENT1("renderer", "RenderWidget::OnHandleInputEvent", 1066 TRACE_EVENT1("renderer,benchmark", "RenderWidget::OnHandleInputEvent",
1067 "event", WebInputEventTraits::GetName(input_event->type)); 1067 "event", WebInputEventTraits::GetName(input_event->type));
1068 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent"); 1068 TRACE_EVENT_SYNTHETIC_DELAY_BEGIN("blink.HandleInputEvent");
1069 TRACE_EVENT_FLOW_STEP0( 1069 TRACE_EVENT_FLOW_STEP0(
1070 "input", 1070 "input,benchmark",
1071 "LatencyInfo.Flow", 1071 "LatencyInfo.Flow",
1072 TRACE_ID_DONT_MANGLE(latency_info.trace_id), 1072 TRACE_ID_DONT_MANGLE(latency_info.trace_id),
1073 "HanldeInputEventMain"); 1073 "HanldeInputEventMain");
1074 1074
1075 // If we don't have a high res timer, these metrics won't be accurate enough 1075 // If we don't have a high res timer, these metrics won't be accurate enough
1076 // to be worth collecting. Note that this does introduce some sampling bias. 1076 // to be worth collecting. Note that this does introduce some sampling bias.
1077 if (!start_time.is_null()) 1077 if (!start_time.is_null())
1078 LogInputEventLatencyUma(*input_event, start_time); 1078 LogInputEventLatencyUma(*input_event, start_time);
1079 1079
1080 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; 1080 scoped_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2372 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2373 video_hole_frames_.AddObserver(frame); 2373 video_hole_frames_.AddObserver(frame);
2374 } 2374 }
2375 2375
2376 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2376 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2377 video_hole_frames_.RemoveObserver(frame); 2377 video_hole_frames_.RemoveObserver(frame);
2378 } 2378 }
2379 #endif // defined(VIDEO_HOLE) 2379 #endif // defined(VIDEO_HOLE)
2380 2380
2381 } // namespace content 2381 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698