| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 } | 190 } |
| 191 | 191 |
| 192 | 192 |
| 193 void ClassTable::Print() { | 193 void ClassTable::Print() { |
| 194 Class& cls = Class::Handle(); | 194 Class& cls = Class::Handle(); |
| 195 String& name = String::Handle(); | 195 String& name = String::Handle(); |
| 196 | 196 |
| 197 for (intptr_t i = 1; i < top_; i++) { | 197 for (intptr_t i = 1; i < top_; i++) { |
| 198 if (!HasValidClassAt(i)) { | |
| 199 continue; | |
| 200 } | |
| 201 if (i == kFreeListElement) { | |
| 202 continue; | |
| 203 } | |
| 204 cls = At(i); | 198 cls = At(i); |
| 205 if (cls.raw() != reinterpret_cast<RawClass*>(0)) { | 199 if (cls.raw() != reinterpret_cast<RawClass*>(0)) { |
| 206 name = cls.Name(); | 200 name = cls.Name(); |
| 207 OS::Print("%" Pd ": %s\n", i, name.ToCString()); | 201 OS::Print("%" Pd ": %s\n", i, name.ToCString()); |
| 208 } | 202 } |
| 209 } | 203 } |
| 210 } | 204 } |
| 211 | 205 |
| 212 | 206 |
| 213 void ClassTable::PrintToJSONObject(JSONObject* object) { | 207 void ClassTable::PrintToJSONObject(JSONObject* object) { |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 472 |
| 479 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { | 473 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { |
| 480 ClassHeapStats* stats = PreliminaryStatsAt(cid); | 474 ClassHeapStats* stats = PreliminaryStatsAt(cid); |
| 481 ASSERT(stats != NULL); | 475 ASSERT(stats != NULL); |
| 482 ASSERT(size >= 0); | 476 ASSERT(size >= 0); |
| 483 stats->post_gc.AddNew(size); | 477 stats->post_gc.AddNew(size); |
| 484 } | 478 } |
| 485 | 479 |
| 486 | 480 |
| 487 } // namespace dart | 481 } // namespace dart |
| OLD | NEW |