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

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

Issue 2826593004: [heap] Reland: Take page lock when scavenging old to new references in Scavenger. (Closed)
Patch Set: Use recursive mutex. Created 3 years, 8 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 | « src/heap/array-buffer-tracker-inl.h ('k') | src/heap/mark-compact.cc » ('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/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/ast/context-slot-cache.h" 10 #include "src/ast/context-slot-cache.h"
(...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 1722
1723 { 1723 {
1724 // Copy roots. 1724 // Copy roots.
1725 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS); 1725 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_ROOTS);
1726 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE); 1726 IterateRoots(&scavenge_visitor, VISIT_ALL_IN_SCAVENGE);
1727 } 1727 }
1728 1728
1729 { 1729 {
1730 // Copy objects reachable from the old generation. 1730 // Copy objects reachable from the old generation.
1731 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS); 1731 TRACE_GC(tracer(), GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS);
1732 RememberedSet<OLD_TO_NEW>::Iterate(this, [this](Address addr) { 1732 RememberedSet<OLD_TO_NEW>::Iterate(
1733 return Scavenger::CheckAndScavengeObject(this, addr); 1733 this, SYNCHRONIZED, [this](Address addr) {
1734 }); 1734 return Scavenger::CheckAndScavengeObject(this, addr);
1735 });
1735 1736
1736 RememberedSet<OLD_TO_NEW>::IterateTyped( 1737 RememberedSet<OLD_TO_NEW>::IterateTyped(
1737 this, [this](SlotType type, Address host_addr, Address addr) { 1738 this, SYNCHRONIZED,
1739 [this](SlotType type, Address host_addr, Address addr) {
1738 return UpdateTypedSlotHelper::UpdateTypedSlot( 1740 return UpdateTypedSlotHelper::UpdateTypedSlot(
1739 isolate(), type, addr, [this](Object** addr) { 1741 isolate(), type, addr, [this](Object** addr) {
1740 // We expect that objects referenced by code are long living. 1742 // We expect that objects referenced by code are long living.
1741 // If we do not force promotion, then we need to clear 1743 // If we do not force promotion, then we need to clear
1742 // old_to_new slots in dead code objects after mark-compact. 1744 // old_to_new slots in dead code objects after mark-compact.
1743 return Scavenger::CheckAndScavengeObject( 1745 return Scavenger::CheckAndScavengeObject(
1744 this, reinterpret_cast<Address>(addr)); 1746 this, reinterpret_cast<Address>(addr));
1745 }); 1747 });
1746 }); 1748 });
1747 } 1749 }
(...skipping 4649 matching lines...) Expand 10 before | Expand all | Expand 10 after
6397 } 6399 }
6398 6400
6399 6401
6400 // static 6402 // static
6401 int Heap::GetStaticVisitorIdForMap(Map* map) { 6403 int Heap::GetStaticVisitorIdForMap(Map* map) {
6402 return StaticVisitorBase::GetVisitorId(map); 6404 return StaticVisitorBase::GetVisitorId(map);
6403 } 6405 }
6404 6406
6405 } // namespace internal 6407 } // namespace internal
6406 } // namespace v8 6408 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/array-buffer-tracker-inl.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698