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

Unified Diff: src/heap/mark-compact.cc

Issue 1004623003: Revert of Reland of Remove slots that point to unboxed doubles from the StoreBuffer/SlotsBuffer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 29cf00e9757922789a908ccf24080fd296db8636..e7ffc19fd950c89eaa516afc61938201886f67da 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -721,7 +721,6 @@
int count = 0;
int fragmentation = 0;
- int page_number = 0;
Candidate* least = NULL;
PageIterator it(space);
@@ -736,16 +735,9 @@
CHECK(p->slots_buffer() == NULL);
if (FLAG_stress_compaction) {
- if (FLAG_manual_evacuation_candidates_selection) {
- if (p->IsFlagSet(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING)) {
- p->ClearFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING);
- fragmentation = 1;
- }
- } else {
- unsigned int counter = space->heap()->ms_count();
- if ((counter & 1) == (page_number & 1)) fragmentation = 1;
- page_number++;
- }
+ unsigned int counter = space->heap()->ms_count();
+ uintptr_t page_number = reinterpret_cast<uintptr_t>(p) >> kPageSizeBits;
+ if ((counter & 1) == (page_number & 1)) fragmentation = 1;
} else if (mode == REDUCE_MEMORY_FOOTPRINT) {
// Don't try to release too many pages.
if (estimated_release >= over_reserved) {
@@ -4507,21 +4499,6 @@
}
-static Object* g_smi_slot = NULL;
-
-
-void SlotsBuffer::RemoveSlot(SlotsBuffer* buffer, ObjectSlot slot_to_remove) {
- DCHECK_EQ(Smi::FromInt(0), g_smi_slot);
- DCHECK(!IsTypedSlot(slot_to_remove));
- while (buffer != NULL) {
- ObjectSlot* slots = buffer->slots_;
- // Remove entries by replacing them with a dummy slot containing a smi.
- std::replace(&slots[0], &slots[buffer->idx_], slot_to_remove, &g_smi_slot);
- buffer = buffer->next_;
- }
-}
-
-
static inline SlotsBuffer::SlotType SlotTypeForRMode(RelocInfo::Mode rmode) {
if (RelocInfo::IsCodeTarget(rmode)) {
return SlotsBuffer::CODE_TARGET_SLOT;
« no previous file with comments | « src/heap/mark-compact.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698