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

Side by Side Diff: src/heap/remembered-set.h

Issue 2418773002: [heap] Move slot filtering logic into sweeper. (Closed)
Patch Set: remove prefree mode Created 4 years, 2 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/mark-compact.cc ('k') | src/heap/remembered-set.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_REMEMBERED_SET_H 5 #ifndef V8_REMEMBERED_SET_H
6 #define V8_REMEMBERED_SET_H 6 #define V8_REMEMBERED_SET_H
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/heap/slot-set.h" 10 #include "src/heap/slot-set.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 while ((chunk = it.next()) != nullptr) { 195 while ((chunk = it.next()) != nullptr) {
196 chunk->ReleaseOldToOldSlots(); 196 chunk->ReleaseOldToOldSlots();
197 chunk->ReleaseTypedOldToOldSlots(); 197 chunk->ReleaseTypedOldToOldSlots();
198 } 198 }
199 } 199 }
200 200
201 // Eliminates all stale slots from the remembered set, i.e. 201 // Eliminates all stale slots from the remembered set, i.e.
202 // slots that are not part of live objects anymore. This method must be 202 // slots that are not part of live objects anymore. This method must be
203 // called after marking, when the whole transitive closure is known and 203 // called after marking, when the whole transitive closure is known and
204 // must be called before sweeping when mark bits are still intact. 204 // must be called before sweeping when mark bits are still intact.
205 static void ClearInvalidSlots(Heap* heap);
206
207 static void ClearInvalidSlots(Heap* heap, MemoryChunk* chunk);
208 static void ClearInvalidTypedSlots(Heap* heap, MemoryChunk* chunk); 205 static void ClearInvalidTypedSlots(Heap* heap, MemoryChunk* chunk);
209 206
210 static void VerifyValidSlots(Heap* heap);
211
212 private: 207 private:
213 static SlotSet* GetSlotSet(MemoryChunk* chunk) { 208 static SlotSet* GetSlotSet(MemoryChunk* chunk) {
214 if (direction == OLD_TO_OLD) { 209 if (direction == OLD_TO_OLD) {
215 return chunk->old_to_old_slots(); 210 return chunk->old_to_old_slots();
216 } else { 211 } else {
217 return chunk->old_to_new_slots(); 212 return chunk->old_to_new_slots();
218 } 213 }
219 } 214 }
220 215
221 static TypedSlotSet* GetTypedSlotSet(MemoryChunk* chunk) { 216 static TypedSlotSet* GetTypedSlotSet(MemoryChunk* chunk) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 return DEBUG_TARGET_SLOT; 377 return DEBUG_TARGET_SLOT;
383 } 378 }
384 UNREACHABLE(); 379 UNREACHABLE();
385 return CLEARED_SLOT; 380 return CLEARED_SLOT;
386 } 381 }
387 382
388 } // namespace internal 383 } // namespace internal
389 } // namespace v8 384 } // namespace v8
390 385
391 #endif // V8_REMEMBERED_SET_H 386 #endif // V8_REMEMBERED_SET_H
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/remembered-set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698