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

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

Issue 2227293002: Add RAIL tracing category to Chrome tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing PaintTiming markers Created 4 years, 4 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 | « no previous file | content/app/content_main_runner.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/trace_event/trace_event.h" 5 #include "base/trace_event/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 IssueImplThreadRenderingStatsEvent(const RenderingStats& stats) { 15 void IssueImplThreadRenderingStatsEvent(const RenderingStats& stats) {
16 TRACE_EVENT_INSTANT1("benchmark", 16 TRACE_EVENT_INSTANT1(
17 "BenchmarkInstrumentation::ImplThreadRenderingStats", 17 "benchmark,rail", "BenchmarkInstrumentation::ImplThreadRenderingStats",
18 TRACE_EVENT_SCOPE_THREAD, 18 TRACE_EVENT_SCOPE_THREAD, "data", stats.AsTraceableData());
19 "data", stats.AsTraceableData());
20 } 19 }
21 20
22 void IssueDisplayRenderingStatsEvent() { 21 void IssueDisplayRenderingStatsEvent() {
23 std::unique_ptr<base::trace_event::TracedValue> record_data( 22 std::unique_ptr<base::trace_event::TracedValue> record_data(
24 new base::trace_event::TracedValue()); 23 new base::trace_event::TracedValue());
25 record_data->SetInteger("frame_count", 1); 24 record_data->SetInteger("frame_count", 1);
26 TRACE_EVENT_INSTANT1( 25 TRACE_EVENT_INSTANT1(
27 "benchmark", "BenchmarkInstrumentation::DisplayRenderingStats", 26 "benchmark", "BenchmarkInstrumentation::DisplayRenderingStats",
28 TRACE_EVENT_SCOPE_THREAD, "data", std::move(record_data)); 27 TRACE_EVENT_SCOPE_THREAD, "data", std::move(record_data));
29 } 28 }
30 29
31 } // namespace benchmark_instrumentation 30 } // namespace benchmark_instrumentation
32 } // namespace cc 31 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698