| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 void ClassTable::ResetAllocationAccumulators() { | 513 void ClassTable::ResetAllocationAccumulators() { |
| 514 for (intptr_t i = 1; i < top_; i++) { | 514 for (intptr_t i = 1; i < top_; i++) { |
| 515 ClassHeapStats* stats = StatsWithUpdatedSize(i); | 515 ClassHeapStats* stats = StatsWithUpdatedSize(i); |
| 516 if (stats != NULL) { | 516 if (stats != NULL) { |
| 517 stats->ResetAccumulator(); | 517 stats->ResetAccumulator(); |
| 518 } | 518 } |
| 519 } | 519 } |
| 520 } | 520 } |
| 521 | 521 |
| 522 | 522 |
| 523 void ClassTable::UpdateLiveOld(intptr_t cid, intptr_t size) { | 523 void ClassTable::UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count) { |
| 524 ClassHeapStats* stats = PreliminaryStatsAt(cid); | 524 ClassHeapStats* stats = PreliminaryStatsAt(cid); |
| 525 ASSERT(stats != NULL); | 525 ASSERT(stats != NULL); |
| 526 ASSERT(size >= 0); | 526 ASSERT(size >= 0); |
| 527 stats->post_gc.AddOld(size); | 527 ASSERT(count >= 0); |
| 528 stats->post_gc.AddOld(size, count); |
| 528 } | 529 } |
| 529 | 530 |
| 530 | 531 |
| 531 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { | 532 void ClassTable::UpdateLiveNew(intptr_t cid, intptr_t size) { |
| 532 ClassHeapStats* stats = PreliminaryStatsAt(cid); | 533 ClassHeapStats* stats = PreliminaryStatsAt(cid); |
| 533 ASSERT(stats != NULL); | 534 ASSERT(stats != NULL); |
| 534 ASSERT(size >= 0); | 535 ASSERT(size >= 0); |
| 535 stats->post_gc.AddNew(size); | 536 stats->post_gc.AddNew(size); |
| 536 } | 537 } |
| 537 | 538 |
| 538 | 539 |
| 539 } // namespace dart | 540 } // namespace dart |
| OLD | NEW |