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

Side by Side Diff: cc/debug/benchmark_instrumentation.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/debug/benchmark_instrumentation.h ('k') | cc/debug/picture_record_benchmark.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 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 "base/debug/trace_event.h" 5 #include "base/debug/trace_event.h"
6 #include "cc/debug/benchmark_instrumentation.h" 6 #include "cc/debug/benchmark_instrumentation.h"
7 7
8 namespace cc { 8 namespace cc {
9 namespace benchmark_instrumentation { 9 namespace benchmark_instrumentation {
10 10
11 // Please do not change the trace events in this file without updating 11 // Please do not change the trace events in this file without updating
12 // tools/perf/measurements/rendering_stats.py accordingly. 12 // tools/perf/measurements/rendering_stats.py accordingly.
13 // The benchmarks search for events and their arguments by name. 13 // The benchmarks search for events and their arguments by name.
14 14
15 void IssueMainThreadRenderingStatsEvent( 15 void IssueImplThreadRenderingStatsEvent(const RenderingStats& stats) {
16 const RenderingStats::MainThreadRenderingStats& stats) {
17 TRACE_EVENT_INSTANT1("benchmark",
18 "BenchmarkInstrumentation::MainThreadRenderingStats",
19 TRACE_EVENT_SCOPE_THREAD,
20 "data", stats.AsTraceableData());
21 }
22
23 void IssueImplThreadRenderingStatsEvent(
24 const RenderingStats::ImplThreadRenderingStats& stats) {
25 TRACE_EVENT_INSTANT1("benchmark", 16 TRACE_EVENT_INSTANT1("benchmark",
26 "BenchmarkInstrumentation::ImplThreadRenderingStats", 17 "BenchmarkInstrumentation::ImplThreadRenderingStats",
27 TRACE_EVENT_SCOPE_THREAD, 18 TRACE_EVENT_SCOPE_THREAD,
28 "data", stats.AsTraceableData()); 19 "data", stats.AsTraceableData());
29 } 20 }
30 21
31 void IssueDisplayRenderingStatsEvent() { 22 void IssueDisplayRenderingStatsEvent() {
32 scoped_refptr<base::debug::TracedValue> record_data = 23 scoped_refptr<base::debug::TracedValue> record_data =
33 new base::debug::TracedValue(); 24 new base::debug::TracedValue();
34 record_data->SetInteger("frame_count", 1); 25 record_data->SetInteger("frame_count", 1);
35 TRACE_EVENT_INSTANT1( 26 TRACE_EVENT_INSTANT1(
36 "benchmark", 27 "benchmark",
37 "BenchmarkInstrumentation::DisplayRenderingStats", 28 "BenchmarkInstrumentation::DisplayRenderingStats",
38 TRACE_EVENT_SCOPE_THREAD, 29 TRACE_EVENT_SCOPE_THREAD,
39 "data", 30 "data",
40 scoped_refptr<base::debug::ConvertableToTraceFormat>(record_data)); 31 scoped_refptr<base::debug::ConvertableToTraceFormat>(record_data));
41 } 32 }
42 33
43 } // namespace benchmark_instrumentation 34 } // namespace benchmark_instrumentation
44 } // namespace cc 35 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/benchmark_instrumentation.h ('k') | cc/debug/picture_record_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698