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

Unified Diff: src/heap/remembered-set.h

Issue 2786313003: Revert of [heap] Take page lock when scavenging old to new references in Scavenger. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/remembered-set.h
diff --git a/src/heap/remembered-set.h b/src/heap/remembered-set.h
index b60cd451ee7166a97ded9c17682a2364b29d8c53..37439bfa62d023a63a55cc6274b1f8bd90220729 100644
--- a/src/heap/remembered-set.h
+++ b/src/heap/remembered-set.h
@@ -12,8 +12,6 @@
namespace v8 {
namespace internal {
-
-enum RememberedSetIterationMode { SYNCHRONIZED, NON_SYNCHRONIZED };
// TODO(ulan): Investigate performance of de-templatizing this class.
template <RememberedSetType type>
@@ -100,13 +98,9 @@
// Iterates and filters the remembered set with the given callback.
// The callback should take (Address slot) and return SlotCallbackResult.
template <typename Callback>
- static void Iterate(Heap* heap, RememberedSetIterationMode mode,
- Callback callback) {
- IterateMemoryChunks(heap, [mode, callback](MemoryChunk* chunk) {
- if (mode == SYNCHRONIZED) chunk->mutex()->Lock();
- Iterate(chunk, callback);
- if (mode == SYNCHRONIZED) chunk->mutex()->Unlock();
- });
+ static void Iterate(Heap* heap, Callback callback) {
+ IterateMemoryChunks(
+ heap, [callback](MemoryChunk* chunk) { Iterate(chunk, callback); });
}
// Iterates over all memory chunks that contains non-empty slot sets.
@@ -183,12 +177,9 @@
// The callback should take (SlotType slot_type, SlotAddress slot) and return
// SlotCallbackResult.
template <typename Callback>
- static void IterateTyped(Heap* heap, RememberedSetIterationMode mode,
- Callback callback) {
- IterateMemoryChunks(heap, [mode, callback](MemoryChunk* chunk) {
- if (mode == SYNCHRONIZED) chunk->mutex()->Lock();
+ static void IterateTyped(Heap* heap, Callback callback) {
+ IterateMemoryChunks(heap, [callback](MemoryChunk* chunk) {
IterateTyped(chunk, callback);
- if (mode == SYNCHRONIZED) chunk->mutex()->Unlock();
});
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698