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/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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 void ClassTable::ResetCountersNew() { | 318 void ClassTable::ResetCountersNew() { |
319 for (intptr_t i = 0; i < kNumPredefinedCids; i++) { | 319 for (intptr_t i = 0; i < kNumPredefinedCids; i++) { |
320 predefined_class_heap_stats_table_[i].ResetAtNewGC(); | 320 predefined_class_heap_stats_table_[i].ResetAtNewGC(); |
321 } | 321 } |
322 for (intptr_t i = kNumPredefinedCids; i < top_; i++) { | 322 for (intptr_t i = kNumPredefinedCids; i < top_; i++) { |
323 class_heap_stats_table_[i].ResetAtNewGC(); | 323 class_heap_stats_table_[i].ResetAtNewGC(); |
324 } | 324 } |
325 } | 325 } |
326 | 326 |
327 | 327 |
328 void ClassTable::AllocationProfilePrintToJSONStream(JSONStream* stream) { | 328 void ClassTable::AllocationProfilePrintJSON(JSONStream* stream) { |
329 Isolate* isolate = Isolate::Current(); | 329 Isolate* isolate = Isolate::Current(); |
330 ASSERT(isolate != NULL); | 330 ASSERT(isolate != NULL); |
331 Heap* heap = isolate->heap(); | 331 Heap* heap = isolate->heap(); |
332 ASSERT(heap != NULL); | 332 ASSERT(heap != NULL); |
333 JSONObject obj(stream); | 333 JSONObject obj(stream); |
334 obj.AddProperty("type", "AllocationProfile"); | 334 obj.AddProperty("type", "AllocationProfile"); |
335 obj.AddProperty("id", "allocationprofile"); | 335 obj.AddProperty("id", "allocationprofile"); |
336 { | 336 { |
337 JSONObject heaps(&obj, "heaps"); | 337 JSONObject heaps(&obj, "heaps"); |
338 { | 338 { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 426 |
427 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { | 427 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { |
428 ClassHeapStats* stats = StatsAt(cid); | 428 ClassHeapStats* stats = StatsAt(cid); |
429 ASSERT(stats != NULL); | 429 ASSERT(stats != NULL); |
430 ASSERT(size >= 0); | 430 ASSERT(size >= 0); |
431 stats->post_gc.AddNew(size); | 431 stats->post_gc.AddNew(size); |
432 } | 432 } |
433 | 433 |
434 | 434 |
435 } // namespace dart | 435 } // namespace dart |
OLD | NEW |