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

Side by Side Diff: src/heap/heap.cc

Issue 2493083003: [heap] Reland concurrent store buffer processing. (Closed)
Patch Set: fix Created 4 years, 1 month 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 | « no previous file | src/heap/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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 ReportStatisticsBeforeGC(); 432 ReportStatisticsBeforeGC();
433 #endif // DEBUG 433 #endif // DEBUG
434 434
435 if (new_space_->IsAtMaximumCapacity()) { 435 if (new_space_->IsAtMaximumCapacity()) {
436 maximum_size_scavenges_++; 436 maximum_size_scavenges_++;
437 } else { 437 } else {
438 maximum_size_scavenges_ = 0; 438 maximum_size_scavenges_ = 0;
439 } 439 }
440 CheckNewSpaceExpansionCriteria(); 440 CheckNewSpaceExpansionCriteria();
441 UpdateNewSpaceAllocationCounter(); 441 UpdateNewSpaceAllocationCounter();
442 store_buffer()->MoveEntriesToRememberedSet(); 442 store_buffer()->MoveAllEntriesToRememberedSet();
443 } 443 }
444 444
445 445
446 intptr_t Heap::SizeOfObjects() { 446 intptr_t Heap::SizeOfObjects() {
447 intptr_t total = 0; 447 intptr_t total = 0;
448 AllSpaces spaces(this); 448 AllSpaces spaces(this);
449 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { 449 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) {
450 total += space->SizeOfObjects(); 450 total += space->SizeOfObjects();
451 } 451 }
452 return total; 452 return total;
(...skipping 5414 matching lines...) Expand 10 before | Expand all | Expand 10 after
5867 }; 5867 };
5868 5868
5869 5869
5870 void Heap::CheckHandleCount() { 5870 void Heap::CheckHandleCount() {
5871 CheckHandleCountVisitor v; 5871 CheckHandleCountVisitor v;
5872 isolate_->handle_scope_implementer()->Iterate(&v); 5872 isolate_->handle_scope_implementer()->Iterate(&v);
5873 } 5873 }
5874 5874
5875 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) { 5875 void Heap::ClearRecordedSlot(HeapObject* object, Object** slot) {
5876 if (!InNewSpace(object)) { 5876 if (!InNewSpace(object)) {
5877 store_buffer()->MoveEntriesToRememberedSet();
5878 Address slot_addr = reinterpret_cast<Address>(slot); 5877 Address slot_addr = reinterpret_cast<Address>(slot);
5879 Page* page = Page::FromAddress(slot_addr); 5878 Page* page = Page::FromAddress(slot_addr);
5880 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); 5879 DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
5880 store_buffer()->MoveAllEntriesToRememberedSet();
5881 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr); 5881 RememberedSet<OLD_TO_NEW>::Remove(page, slot_addr);
5882 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr); 5882 RememberedSet<OLD_TO_OLD>::Remove(page, slot_addr);
5883 } 5883 }
5884 } 5884 }
5885 5885
5886 void Heap::ClearRecordedSlotRange(Address start, Address end) { 5886 void Heap::ClearRecordedSlotRange(Address start, Address end) {
5887 Page* page = Page::FromAddress(start); 5887 Page* page = Page::FromAddress(start);
5888 if (!page->InNewSpace()) { 5888 if (!page->InNewSpace()) {
5889 store_buffer()->MoveEntriesToRememberedSet();
5890 DCHECK_EQ(page->owner()->identity(), OLD_SPACE); 5889 DCHECK_EQ(page->owner()->identity(), OLD_SPACE);
5890 store_buffer()->MoveAllEntriesToRememberedSet();
5891 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end, 5891 RememberedSet<OLD_TO_NEW>::RemoveRange(page, start, end,
5892 SlotSet::PREFREE_EMPTY_BUCKETS); 5892 SlotSet::PREFREE_EMPTY_BUCKETS);
5893 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end, 5893 RememberedSet<OLD_TO_OLD>::RemoveRange(page, start, end,
5894 SlotSet::FREE_EMPTY_BUCKETS); 5894 SlotSet::FREE_EMPTY_BUCKETS);
5895 } 5895 }
5896 } 5896 }
5897 5897
5898 void Heap::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, 5898 void Heap::RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo,
5899 Object* value) { 5899 Object* value) {
5900 DCHECK(InNewSpace(value)); 5900 DCHECK(InNewSpace(value));
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
6455 } 6455 }
6456 6456
6457 6457
6458 // static 6458 // static
6459 int Heap::GetStaticVisitorIdForMap(Map* map) { 6459 int Heap::GetStaticVisitorIdForMap(Map* map) {
6460 return StaticVisitorBase::GetVisitorId(map); 6460 return StaticVisitorBase::GetVisitorId(map);
6461 } 6461 }
6462 6462
6463 } // namespace internal 6463 } // namespace internal
6464 } // namespace v8 6464 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/store-buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698