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

Side by Side Diff: cc/output/latency_info_swap_promise.cc

Issue 1178963003: Trace main thread commit in flow events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make OnCommitForSwapPromises protected and be called from WillCommit. Created 5 years, 6 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 | « cc/output/latency_info_swap_promise.h ('k') | cc/output/swap_promise.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/output/latency_info_swap_promise.h" 5 #include "cc/output/latency_info_swap_promise.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/trace_event/trace_event.h"
8 9
9 namespace { 10 namespace {
10 ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType( 11 ui::LatencyComponentType DidNotSwapReasonToLatencyComponentType(
11 cc::SwapPromise::DidNotSwapReason reason) { 12 cc::SwapPromise::DidNotSwapReason reason) {
12 switch (reason) { 13 switch (reason) {
13 case cc::SwapPromise::ACTIVATION_FAILS: 14 case cc::SwapPromise::ACTIVATION_FAILS:
14 case cc::SwapPromise::SWAP_FAILS: 15 case cc::SwapPromise::SWAP_FAILS:
15 return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT; 16 return ui::INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT;
16 case cc::SwapPromise::COMMIT_FAILS: 17 case cc::SwapPromise::COMMIT_FAILS:
17 return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT; 18 return ui::INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT;
(...skipping 24 matching lines...) Expand all
42 0); 43 0);
43 // TODO(miletus): Turn this back on once per-event LatencyInfo tracking 44 // TODO(miletus): Turn this back on once per-event LatencyInfo tracking
44 // is enabled in GPU side. 45 // is enabled in GPU side.
45 // DCHECK(latency_.terminated); 46 // DCHECK(latency_.terminated);
46 } 47 }
47 48
48 int64 LatencyInfoSwapPromise::TraceId() const { 49 int64 LatencyInfoSwapPromise::TraceId() const {
49 return latency_.trace_id; 50 return latency_.trace_id;
50 } 51 }
51 52
53 // Trace the original LatencyInfo of a LatencyInfoSwapPromise
54 void LatencyInfoSwapPromise::OnCommit() {
55 TRACE_EVENT_FLOW_STEP0("input,benchmark", "LatencyInfo.Flow",
56 TRACE_ID_DONT_MANGLE(TraceId()),
57 "HanldeInputEventMainCommit");
58 }
59
52 } // namespace cc 60 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/latency_info_swap_promise.h ('k') | cc/output/swap_promise.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698