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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1406413006: Timeline service protocol support with Observatory UI (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 | « runtime/vm/dart.cc ('k') | runtime/vm/debugger.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 5719 matching lines...) Expand 10 before | Expand all | Expand 10 after
5730 5730
5731 DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask) { 5731 DART_EXPORT void Dart_TimelineSetRecordedStreams(int64_t stream_mask) {
5732 Isolate* isolate = Isolate::Current(); 5732 Isolate* isolate = Isolate::Current();
5733 CHECK_ISOLATE(isolate); 5733 CHECK_ISOLATE(isolate);
5734 isolate->GetAPIStream()->set_enabled( 5734 isolate->GetAPIStream()->set_enabled(
5735 (stream_mask & DART_TIMELINE_STREAM_API) != 0); 5735 (stream_mask & DART_TIMELINE_STREAM_API) != 0);
5736 isolate->GetCompilerStream()->set_enabled( 5736 isolate->GetCompilerStream()->set_enabled(
5737 (stream_mask & DART_TIMELINE_STREAM_COMPILER) != 0); 5737 (stream_mask & DART_TIMELINE_STREAM_COMPILER) != 0);
5738 isolate->GetDartStream()->set_enabled( 5738 isolate->GetDartStream()->set_enabled(
5739 (stream_mask & DART_TIMELINE_STREAM_DART) != 0); 5739 (stream_mask & DART_TIMELINE_STREAM_DART) != 0);
5740 isolate->GetDebuggerStream()->set_enabled(
5741 (stream_mask & DART_TIMELINE_STREAM_DEBUGGER) != 0);
5740 isolate->GetEmbedderStream()->set_enabled( 5742 isolate->GetEmbedderStream()->set_enabled(
5741 (stream_mask & DART_TIMELINE_STREAM_EMBEDDER) != 0); 5743 (stream_mask & DART_TIMELINE_STREAM_EMBEDDER) != 0);
5742 isolate->GetGCStream()->set_enabled( 5744 isolate->GetGCStream()->set_enabled(
5743 (stream_mask & DART_TIMELINE_STREAM_GC) != 0); 5745 (stream_mask & DART_TIMELINE_STREAM_GC) != 0);
5744 isolate->GetIsolateStream()->set_enabled( 5746 isolate->GetIsolateStream()->set_enabled(
5745 (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0); 5747 (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0);
5746 } 5748 }
5747 5749
5748 5750
5749 DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask) { 5751 DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask) {
5750 // Per isolate overrides. 5752 // Per isolate overrides.
5751 const bool api_enabled = (stream_mask & DART_TIMELINE_STREAM_API) != 0; 5753 const bool api_enabled = (stream_mask & DART_TIMELINE_STREAM_API) != 0;
5752 const bool compiler_enabled = 5754 const bool compiler_enabled =
5753 (stream_mask & DART_TIMELINE_STREAM_COMPILER) != 0; 5755 (stream_mask & DART_TIMELINE_STREAM_COMPILER) != 0;
5754 const bool dart_enabled = 5756 const bool dart_enabled =
5755 (stream_mask & DART_TIMELINE_STREAM_DART) != 0; 5757 (stream_mask & DART_TIMELINE_STREAM_DART) != 0;
5758 const bool debugger_enabled =
5759 (stream_mask & DART_TIMELINE_STREAM_DEBUGGER) != 0;
5756 const bool embedder_enabled = 5760 const bool embedder_enabled =
5757 (stream_mask & DART_TIMELINE_STREAM_EMBEDDER) != 0; 5761 (stream_mask & DART_TIMELINE_STREAM_EMBEDDER) != 0;
5758 const bool gc_enabled = (stream_mask & DART_TIMELINE_STREAM_GC) != 0; 5762 const bool gc_enabled = (stream_mask & DART_TIMELINE_STREAM_GC) != 0;
5759 const bool isolate_enabled = 5763 const bool isolate_enabled =
5760 (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0; 5764 (stream_mask & DART_TIMELINE_STREAM_ISOLATE) != 0;
5761 Timeline::SetStreamAPIEnabled(api_enabled); 5765 Timeline::SetStreamAPIEnabled(api_enabled);
5762 Timeline::SetStreamCompilerEnabled(compiler_enabled); 5766 Timeline::SetStreamCompilerEnabled(compiler_enabled);
5763 Timeline::SetStreamDartEnabled(dart_enabled); 5767 Timeline::SetStreamDartEnabled(dart_enabled);
5768 Timeline::SetStreamDebuggerEnabled(debugger_enabled);
5764 Timeline::SetStreamEmbedderEnabled(embedder_enabled); 5769 Timeline::SetStreamEmbedderEnabled(embedder_enabled);
5765 Timeline::SetStreamGCEnabled(gc_enabled); 5770 Timeline::SetStreamGCEnabled(gc_enabled);
5766 Timeline::SetStreamIsolateEnabled(isolate_enabled); 5771 Timeline::SetStreamIsolateEnabled(isolate_enabled);
5767 // VM wide. 5772 // VM wide.
5768 const bool vm_enabled = 5773 const bool vm_enabled =
5769 (stream_mask & DART_TIMELINE_STREAM_VM) != 0; 5774 (stream_mask & DART_TIMELINE_STREAM_VM) != 0;
5770 Timeline::GetVMStream()->set_enabled(vm_enabled); 5775 Timeline::GetVMStream()->set_enabled(vm_enabled);
5771 } 5776 }
5772 5777
5773 5778
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
6083 ApiReallocate); 6088 ApiReallocate);
6084 writer.WriteFullSnapshot(); 6089 writer.WriteFullSnapshot();
6085 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); 6090 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
6086 *isolate_snapshot_size = writer.IsolateSnapshotSize(); 6091 *isolate_snapshot_size = writer.IsolateSnapshotSize();
6087 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); 6092 *instructions_snapshot_size = writer.InstructionsSnapshotSize();
6088 6093
6089 return Api::Success(); 6094 return Api::Success();
6090 } 6095 }
6091 6096
6092 } // namespace dart 6097 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698