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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1362503002: Add global timeline stream overrides (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/include/dart_tools_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 5e1105a2ef95e7460d93feee9f3c0531ecd32790..10b9f95e29d0fe40d985574998f877ec68765a38 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5692,6 +5692,28 @@ DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask) {
}
+DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask) {
+ // Per isolate overrides.
+ const bool api_enabled = (stream_mask & DART_TIMELINE_STREAM_API) != 0;
+ const bool compiler_enabled =
+ (stream_mask & DART_TIMELINE_STREAM_COMPILER) != 0;
+ const bool embedder_enabled =
+ (stream_mask & DART_TIMELINE_STREAM_EMBEDDER) != 0;
+ const bool gc_enabled = (stream_mask & DART_TIMELINE_STREAM_GC) != 0;
+ const bool isolate_enabled =
+ (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0;
+ Timeline::SetStreamAPIEnabled(api_enabled);
+ Timeline::SetStreamCompilerEnabled(compiler_enabled);
+ Timeline::SetStreamEmbedderEnabled(embedder_enabled);
+ Timeline::SetStreamGCEnabled(gc_enabled);
+ Timeline::SetStreamIsolateEnabled(isolate_enabled);
+ // VM wide.
+ const bool vm_enabled =
+ (stream_mask & DART_TIMELINE_STREAM_VM) != 0;
+ Timeline::GetVMStream()->set_enabled(vm_enabled);
+}
+
+
DART_EXPORT bool Dart_TimelineGetTrace(Dart_StreamConsumer consumer,
void* user_data) {
Isolate* isolate = Isolate::Current();
« no previous file with comments | « runtime/include/dart_tools_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698