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

Side by Side Diff: runtime/vm/class_table.cc

Issue 1346333003: Make old-space heap stats safe for parallel marking. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix count. Created 5 years, 3 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
« no previous file with comments | « runtime/vm/class_table.h ('k') | runtime/vm/gc_marker.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/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
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
OLDNEW
« no previous file with comments | « runtime/vm/class_table.h ('k') | runtime/vm/gc_marker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698