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

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

Issue 1350933004: Distinct block sizes for StoreBuffer/MarkingStack. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. 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/gc_marker.cc ('k') | runtime/vm/store_buffer.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/scavenger.h" 5 #include "vm/scavenger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 intptr_t count = pending->Count(); 519 intptr_t count = pending->Count();
520 total_count += count; 520 total_count += count;
521 while (!pending->IsEmpty()) { 521 while (!pending->IsEmpty()) {
522 RawObject* raw_object = pending->Pop(); 522 RawObject* raw_object = pending->Pop();
523 ASSERT(raw_object->IsRemembered()); 523 ASSERT(raw_object->IsRemembered());
524 raw_object->ClearRememberedBit(); 524 raw_object->ClearRememberedBit();
525 visitor->VisitingOldObject(raw_object); 525 visitor->VisitingOldObject(raw_object);
526 raw_object->VisitPointers(visitor); 526 raw_object->VisitPointers(visitor);
527 } 527 }
528 pending->Reset(); 528 pending->Reset();
529 isolate->store_buffer()->PushBlock(pending); 529 // Return the emptied block for recycling (no need to check threshold).
530 isolate->store_buffer()->PushBlock(pending, StoreBuffer::kIgnoreThreshold);
530 pending = next; 531 pending = next;
531 } 532 }
532 heap_->RecordData(kStoreBufferEntries, total_count); 533 heap_->RecordData(kStoreBufferEntries, total_count);
533 heap_->RecordData(kDataUnused1, 0); 534 heap_->RecordData(kDataUnused1, 0);
534 heap_->RecordData(kDataUnused2, 0); 535 heap_->RecordData(kDataUnused2, 0);
535 // Done iterating through old objects remembered in the store buffers. 536 // Done iterating through old objects remembered in the store buffers.
536 visitor->VisitingOldObject(NULL); 537 visitor->VisitingOldObject(NULL);
537 } 538 }
538 539
539 540
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 } 914 }
914 915
915 916
916 void Scavenger::FreeExternal(intptr_t size) { 917 void Scavenger::FreeExternal(intptr_t size) {
917 ASSERT(size >= 0); 918 ASSERT(size >= 0);
918 external_size_ -= size; 919 external_size_ -= size;
919 ASSERT(external_size_ >= 0); 920 ASSERT(external_size_ >= 0);
920 } 921 }
921 922
922 } // namespace dart 923 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/gc_marker.cc ('k') | runtime/vm/store_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698