| OLD | NEW |
| 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(const MainThreadRenderingStats& stats) { | 15 void IssueMainThreadRenderingStatsEvent( |
| 16 const RenderingStats::MainThreadRenderingStats& stats) { |
| 16 TRACE_EVENT_INSTANT1("benchmark", | 17 TRACE_EVENT_INSTANT1("benchmark", |
| 17 "BenchmarkInstrumentation::MainThreadRenderingStats", | 18 "BenchmarkInstrumentation::MainThreadRenderingStats", |
| 18 TRACE_EVENT_SCOPE_THREAD, | 19 TRACE_EVENT_SCOPE_THREAD, |
| 19 "data", stats.AsTraceableData()); | 20 "data", stats.AsTraceableData()); |
| 20 } | 21 } |
| 21 | 22 |
| 22 void IssueImplThreadRenderingStatsEvent(const ImplThreadRenderingStats& stats) { | 23 void IssueImplThreadRenderingStatsEvent( |
| 24 const RenderingStats::ImplThreadRenderingStats& stats) { |
| 23 TRACE_EVENT_INSTANT1("benchmark", | 25 TRACE_EVENT_INSTANT1("benchmark", |
| 24 "BenchmarkInstrumentation::ImplThreadRenderingStats", | 26 "BenchmarkInstrumentation::ImplThreadRenderingStats", |
| 25 TRACE_EVENT_SCOPE_THREAD, | 27 TRACE_EVENT_SCOPE_THREAD, |
| 26 "data", stats.AsTraceableData()); | 28 "data", stats.AsTraceableData()); |
| 27 } | 29 } |
| 28 | 30 |
| 29 } // namespace benchmark_instrumentation | 31 } // namespace benchmark_instrumentation |
| 30 } // namespace cc | 32 } // namespace cc |
| OLD | NEW |