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

Unified Diff: src/heap/heap.cc

Issue 2592603002: [heap] Do not clear mark bits of black large objects on right trim. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 8e032ba52b0c6b2d001ceab52689f19dfeae718a..b306a20a3d3ff0926688af2c412487ca31393476 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3238,16 +3238,15 @@ void Heap::RightTrimFixedArray(FixedArrayBase* object, int elements_to_trim) {
// of the object changed significantly.
if (!lo_space()->Contains(object)) {
CreateFillerObjectAt(new_end, bytes_to_trim, ClearRecordedSlots::kYes);
- }
-
- // Clear the mark bits of the black area that belongs now to the filler.
- // This is an optimization. The sweeper will release black fillers anyway.
- if (incremental_marking()->black_allocation() &&
- Marking::IsBlackOrGrey(ObjectMarking::MarkBitFrom(new_end))) {
- Page* page = Page::FromAddress(new_end);
- page->markbits()->ClearRange(
- page->AddressToMarkbitIndex(new_end),
- page->AddressToMarkbitIndex(new_end + bytes_to_trim));
+ // Clear the mark bits of the black area that belongs now to the filler.
+ // This is an optimization. The sweeper will release black fillers anyway.
+ if (incremental_marking()->black_allocation() &&
+ Marking::IsBlackOrGrey(ObjectMarking::MarkBitFrom(new_end))) {
+ Page* page = Page::FromAddress(new_end);
+ page->markbits()->ClearRange(
+ page->AddressToMarkbitIndex(new_end),
+ page->AddressToMarkbitIndex(new_end + bytes_to_trim));
+ }
}
// Initialize header of the trimmed array. We are storing the new length
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698