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

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

Issue 148153007: Add Google Charts to Observatory and use it in allocation profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/vmservice/client/web/main.dart ('k') | no next file » | 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 "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 816
817 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, 817 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor,
818 bool visit_prologue_weak_handles) { 818 bool visit_prologue_weak_handles) {
819 if (api_state() != NULL) { 819 if (api_state() != NULL) {
820 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); 820 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles);
821 } 821 }
822 } 822 }
823 823
824 824
825 void Isolate::PrintToJSONStream(JSONStream* stream) { 825 void Isolate::PrintToJSONStream(JSONStream* stream) {
826 fprintf(stderr, "Printing isolate %" Pd "\n",
827 static_cast<intptr_t>(main_port()));
828 JSONObject jsobj(stream); 826 JSONObject jsobj(stream);
829 jsobj.AddProperty("type", "Isolate"); 827 jsobj.AddProperty("type", "Isolate");
830 jsobj.AddPropertyF("id", "isolates/%" Pd "", 828 jsobj.AddPropertyF("id", "isolates/%" Pd "",
831 static_cast<intptr_t>(main_port())); 829 static_cast<intptr_t>(main_port()));
832 jsobj.AddPropertyF("name", "%" Pd "", 830 jsobj.AddPropertyF("name", "%" Pd "",
833 static_cast<intptr_t>(main_port())); 831 static_cast<intptr_t>(main_port()));
834 IsolateSpawnState* state = spawn_state(); 832 IsolateSpawnState* state = spawn_state();
835 if (state != NULL) { 833 if (state != NULL) {
836 const Object& entry = Object::Handle(this, state->ResolveFunction()); 834 const Object& entry = Object::Handle(this, state->ResolveFunction());
837 if (!entry.IsNull() && entry.IsFunction()) { 835 if (!entry.IsNull() && entry.IsFunction()) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 return func.raw(); 970 return func.raw();
973 } 971 }
974 972
975 973
976 void IsolateSpawnState::Cleanup() { 974 void IsolateSpawnState::Cleanup() {
977 SwitchIsolateScope switch_scope(isolate()); 975 SwitchIsolateScope switch_scope(isolate());
978 Dart::ShutdownIsolate(); 976 Dart::ShutdownIsolate();
979 } 977 }
980 978
981 } // namespace dart 979 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/client/web/main.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698