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

Unified Diff: src/heap/spaces.cc

Issue 2043713006: [heap] Clear out of live range remembered set slots in large objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/spaces.h ('k') | test/mjsunit/regress/regress-617882.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 4a565ac90747bea2c3f4bc4e15af1386ec13d778..5e98b826811cf022e7028d841c1fe3a88f17b34f 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2923,6 +2923,19 @@ Address LargePage::GetAddressToShrink() {
return 0;
}
+void LargePage::ClearOutOfLiveRangeSlots(Address free_start) {
+ if (old_to_new_slots() != nullptr) {
+ old_to_new_slots()->RemoveRange(
+ static_cast<int>(free_start - address()),
+ static_cast<int>(free_start + size() - address()));
+ }
+ if (old_to_old_slots() != nullptr) {
+ old_to_old_slots()->RemoveRange(
+ static_cast<int>(free_start - address()),
+ static_cast<int>(free_start + size() - address()));
+ }
+}
+
// -----------------------------------------------------------------------------
// LargeObjectIterator
@@ -3083,6 +3096,7 @@ void LargeObjectSpace::FreeUnmarkedObjects() {
Address free_start;
if ((free_start = current->GetAddressToShrink()) != 0) {
// TODO(hpayer): Perform partial free concurrently.
+ current->ClearOutOfLiveRangeSlots(free_start);
heap()->memory_allocator()->PartialFreeMemory(current, free_start);
}
previous = current;
« no previous file with comments | « src/heap/spaces.h ('k') | test/mjsunit/regress/regress-617882.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698