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

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

Issue 1239593002: Implement a new flow event API that allows binding flow events and regular events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add support for flow steps. Created 5 years, 5 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 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 #include "base/trace_event/trace_event.h"
9 9
10 namespace { 10 namespace {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // is enabled in GPU side. 45 // is enabled in GPU side.
46 // DCHECK(latency_.terminated); 46 // DCHECK(latency_.terminated);
47 } 47 }
48 48
49 int64 LatencyInfoSwapPromise::TraceId() const { 49 int64 LatencyInfoSwapPromise::TraceId() const {
50 return latency_.trace_id; 50 return latency_.trace_id;
51 } 51 }
52 52
53 // Trace the original LatencyInfo of a LatencyInfoSwapPromise 53 // Trace the original LatencyInfo of a LatencyInfoSwapPromise
54 void LatencyInfoSwapPromise::OnCommit() { 54 void LatencyInfoSwapPromise::OnCommit() {
55 TRACE_EVENT_WITH_FLOW0("toplevel", "LatencyInfoSwapPromise::OnCommit",
56 TRACE_ID_DONT_MANGLE(TraceId()),
57 TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT);
55 TRACE_EVENT_FLOW_STEP0("input,benchmark", "LatencyInfo.Flow", 58 TRACE_EVENT_FLOW_STEP0("input,benchmark", "LatencyInfo.Flow",
56 TRACE_ID_DONT_MANGLE(TraceId()), 59 TRACE_ID_DONT_MANGLE(TraceId()),
57 "HanldeInputEventMainCommit"); 60 "HanldeInputEventMainCommit");
58 } 61 }
59 62
60 } // namespace cc 63 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698