| OLD | NEW |
| 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/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 name = cls.Name(); | 206 name = cls.Name(); |
| 207 OS::Print("%" Pd ": %s\n", i, name.ToCString()); | 207 OS::Print("%" Pd ": %s\n", i, name.ToCString()); |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 | 212 |
| 213 void ClassTable::PrintToJSONObject(JSONObject* object) { | 213 void ClassTable::PrintToJSONObject(JSONObject* object) { |
| 214 Class& cls = Class::Handle(); | 214 Class& cls = Class::Handle(); |
| 215 object->AddProperty("type", "ClassList"); | 215 object->AddProperty("type", "ClassList"); |
| 216 object->AddProperty("id", "classes"); | |
| 217 { | 216 { |
| 218 JSONArray members(object, "members"); | 217 JSONArray members(object, "classes"); |
| 219 for (intptr_t i = 1; i < top_; i++) { | 218 for (intptr_t i = 1; i < top_; i++) { |
| 220 if (HasValidClassAt(i)) { | 219 if (HasValidClassAt(i)) { |
| 221 cls = At(i); | 220 cls = At(i); |
| 222 members.AddValue(cls); | 221 members.AddValue(cls); |
| 223 } | 222 } |
| 224 } | 223 } |
| 225 } | 224 } |
| 226 } | 225 } |
| 227 | 226 |
| 228 | 227 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 477 |
| 479 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { | 478 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { |
| 480 ClassHeapStats* stats = PreliminaryStatsAt(cid); | 479 ClassHeapStats* stats = PreliminaryStatsAt(cid); |
| 481 ASSERT(stats != NULL); | 480 ASSERT(stats != NULL); |
| 482 ASSERT(size >= 0); | 481 ASSERT(size >= 0); |
| 483 stats->post_gc.AddNew(size); | 482 stats->post_gc.AddNew(size); |
| 484 } | 483 } |
| 485 | 484 |
| 486 | 485 |
| 487 } // namespace dart | 486 } // namespace dart |
| OLD | NEW |