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

Side by Side Diff: services/dart/dart_tracing.cc

Issue 1665823003: Only enable the Dart timeline for benchmarks (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 | « services/dart/content_handler_main.cc ('k') | services/tracing/tracing_app.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/dart/dart_tracing.h" 5 #include "services/dart/dart_tracing.h"
6 6
7 #include "dart/runtime/include/dart_tools_api.h" 7 #include "dart/runtime/include/dart_tools_api.h"
8 #include "mojo/public/cpp/application/application_impl.h" 8 #include "mojo/public/cpp/application/application_impl.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 void DartTimelineController::Enable(const mojo::String& categories) { 12 void DartTimelineController::Enable(const mojo::String& categories) {
13 // TODO(johnmccutchan): Respect |categories|. 13 if (categories == mojo::String("Dart")) {
14 EnableAll(); 14 Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_DART);
15 } else {
16 // TODO(johnmccutchan): Respect |categories|.
17 EnableAll();
18 }
15 } 19 }
16 20
17 void DartTimelineController::EnableAll() { 21 void DartTimelineController::EnableAll() {
18 Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL | 22 Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_ALL |
19 DART_TIMELINE_STREAM_VM); 23 DART_TIMELINE_STREAM_VM);
20 } 24 }
21 25
22 void DartTimelineController::Disable() { 26 void DartTimelineController::Disable() {
23 Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_DISABLE); 27 Dart_GlobalTimelineSetRecordedStreams(DART_TIMELINE_STREAM_DISABLE);
24 } 28 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 connection->AddService(this); 131 connection->AddService(this);
128 } 132 }
129 133
130 void DartTracingImpl::Create( 134 void DartTracingImpl::Create(
131 mojo::ApplicationConnection* connection, 135 mojo::ApplicationConnection* connection,
132 mojo::InterfaceRequest<tracing::TraceProvider> request) { 136 mojo::InterfaceRequest<tracing::TraceProvider> request) {
133 provider_impl_.Bind(request.Pass()); 137 provider_impl_.Bind(request.Pass());
134 } 138 }
135 139
136 } // namespace dart 140 } // namespace dart
OLDNEW
« no previous file with comments | « services/dart/content_handler_main.cc ('k') | services/tracing/tracing_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698