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

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

Issue 2390743005: [heap] Concurrently free empty slot set buckets. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: src/heap/remembered-set.h
diff --git a/src/heap/remembered-set.h b/src/heap/remembered-set.h
index 919da9ff6f4fd9cc96ebac625d71419c7df48213..74791b926bb7772a4646dcec507abbe561c7f85b 100644
--- a/src/heap/remembered-set.h
+++ b/src/heap/remembered-set.h
@@ -116,10 +116,13 @@ class RememberedSet {
size_t pages = (chunk->size() + Page::kPageSize - 1) / Page::kPageSize;
int new_count = 0;
for (size_t page = 0; page < pages; page++) {
- new_count += slots[page].Iterate(callback);
+ new_count +=
+ slots[page].Iterate(callback, SlotSet::PREFREE_EMPTY_BUCKETS);
}
- if (new_count == 0) {
- ReleaseSlotSet(chunk);
+ // Only old-to-old slot sets are released eagerly. Old-new-slot sets are
+ // released by the sweeper threads.
+ if (direction == OLD_TO_OLD && new_count == 0) {
+ chunk->ReleaseOldToOldSlots();
}
}
}
@@ -219,14 +222,6 @@ class RememberedSet {
}
}
- static void ReleaseSlotSet(MemoryChunk* chunk) {
- if (direction == OLD_TO_OLD) {
- chunk->ReleaseOldToOldSlots();
- } else {
- chunk->ReleaseOldToNewSlots();
- }
- }
-
static void ReleaseTypedSlotSet(MemoryChunk* chunk) {
if (direction == OLD_TO_OLD) {
chunk->ReleaseTypedOldToOldSlots();
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/remembered-set.cc » ('j') | src/heap/slot-set.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698