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

Side by Side Diff: runtime/vm/class_table.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
« no previous file with comments | « runtime/vm/class_table.h ('k') | runtime/vm/heap.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/class_table.h" 5 #include "vm/class_table.h"
6 #include "vm/flags.h" 6 #include "vm/flags.h"
7 #include "vm/freelist.h" 7 #include "vm/freelist.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/raw_object.h" 10 #include "vm/raw_object.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 for (intptr_t i = 1; i < top_; i++) { 160 for (intptr_t i = 1; i < top_; i++) {
161 cls = At(i); 161 cls = At(i);
162 if (cls.raw() != reinterpret_cast<RawClass*>(0)) { 162 if (cls.raw() != reinterpret_cast<RawClass*>(0)) {
163 name = cls.Name(); 163 name = cls.Name();
164 OS::Print("%" Pd ": %s\n", i, name.ToCString()); 164 OS::Print("%" Pd ": %s\n", i, name.ToCString());
165 } 165 }
166 } 166 }
167 } 167 }
168 168
169 169
170 void ClassTable::PrintToJSONStream(JSONStream* stream) { 170 void ClassTable::PrintToJSONObject(JSONObject* object) {
171 Class& cls = Class::Handle(); 171 Class& cls = Class::Handle();
172 JSONObject jsobj(stream); 172 object->AddProperty("type", "ClassList");
Cutch 2014/03/20 17:25:57 Please add an id: object->AddProperty("id", "clas
koda 2014/03/20 18:55:48 Done.
173 jsobj.AddProperty("type", "ClassList");
174 { 173 {
175 JSONArray members(&jsobj, "members"); 174 JSONArray members(object, "members");
176 for (intptr_t i = 1; i < top_; i++) { 175 for (intptr_t i = 1; i < top_; i++) {
177 if (HasValidClassAt(i)) { 176 if (HasValidClassAt(i)) {
178 cls = At(i); 177 cls = At(i);
179 members.AddValue(cls); 178 members.AddValue(cls);
180 } 179 }
181 } 180 }
182 } 181 }
183 } 182 }
184 183
185 184
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 425
427 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { 426 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) {
428 ClassHeapStats* stats = StatsAt(cid); 427 ClassHeapStats* stats = StatsAt(cid);
429 ASSERT(stats != NULL); 428 ASSERT(stats != NULL);
430 ASSERT(size >= 0); 429 ASSERT(size >= 0);
431 stats->post_gc.AddNew(size); 430 stats->post_gc.AddNew(size);
432 } 431 }
433 432
434 433
435 } // namespace dart 434 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_table.h ('k') | runtime/vm/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698