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

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

Issue 204103009: Add class and address information to heap map; display on hover. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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
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/service.h" 5 #include "vm/service.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/coverage.h" 10 #include "vm/coverage.h"
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 return true; 908 return true;
909 } 909 }
910 field.PrintToJSONStream(js, false); 910 field.PrintToJSONStream(js, false);
911 return true; 911 return true;
912 } 912 }
913 913
914 914
915 static bool HandleClasses(Isolate* isolate, JSONStream* js) { 915 static bool HandleClasses(Isolate* isolate, JSONStream* js) {
916 if (js->num_arguments() == 1) { 916 if (js->num_arguments() == 1) {
917 ClassTable* table = isolate->class_table(); 917 ClassTable* table = isolate->class_table();
918 table->PrintToJSONStream(js); 918 JSONObject jsobj(js);
919 table->PrintToJSONObject(&jsobj);
919 return true; 920 return true;
920 } 921 }
921 ASSERT(js->num_arguments() >= 2); 922 ASSERT(js->num_arguments() >= 2);
922 intptr_t id; 923 intptr_t id;
923 if (!GetIntegerId(js->GetArgument(1), &id)) { 924 if (!GetIntegerId(js->GetArgument(1), &id)) {
924 PrintError(js, "Must specify collection object id: /classes/id"); 925 PrintError(js, "Must specify collection object id: /classes/id");
925 return true; 926 return true;
926 } 927 }
927 ClassTable* table = isolate->class_table(); 928 ClassTable* table = isolate->class_table();
928 if (!table->IsValidIndex(id)) { 929 if (!table->IsValidIndex(id)) {
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 1407
1407 1408
1408 static bool HandleUnpin(Isolate* isolate, JSONStream* js) { 1409 static bool HandleUnpin(Isolate* isolate, JSONStream* js) {
1409 // TODO(johnmccutchan): What do I respond with?? 1410 // TODO(johnmccutchan): What do I respond with??
1410 isolate->ClosePinPort(); 1411 isolate->ClosePinPort();
1411 return true; 1412 return true;
1412 } 1413 }
1413 1414
1414 1415
1415 static bool HandleHeapMap(Isolate* isolate, JSONStream* js) { 1416 static bool HandleHeapMap(Isolate* isolate, JSONStream* js) {
1416 isolate->heap()->PrintHeapMapToJSONStream(js); 1417 isolate->heap()->PrintHeapMapToJSONStream(isolate, js);
1417 return true; 1418 return true;
1418 } 1419 }
1419 1420
1420 1421
1421 static IsolateMessageHandlerEntry isolate_handlers[] = { 1422 static IsolateMessageHandlerEntry isolate_handlers[] = {
1422 { "_echo", HandleIsolateEcho }, 1423 { "_echo", HandleIsolateEcho },
1423 { "", HandleIsolate }, 1424 { "", HandleIsolate },
1424 { "allocationprofile", HandleAllocationProfile }, 1425 { "allocationprofile", HandleAllocationProfile },
1425 { "classes", HandleClasses }, 1426 { "classes", HandleClasses },
1426 { "code", HandleCode }, 1427 { "code", HandleCode },
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 while (current != NULL) { 1647 while (current != NULL) {
1647 if (strcmp(name, current->name()) == 0) { 1648 if (strcmp(name, current->name()) == 0) {
1648 return current; 1649 return current;
1649 } 1650 }
1650 current = current->next(); 1651 current = current->next();
1651 } 1652 }
1652 return NULL; 1653 return NULL;
1653 } 1654 }
1654 1655
1655 } // namespace dart 1656 } // namespace dart
OLDNEW
« runtime/vm/class_table.cc ('K') | « runtime/vm/pages.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698