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

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

Issue 1260463002: Remove slot buffer entries in deoptimized code objects after marking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index 254328a9e2db25259ac5a3f12edfd1eb86f7e6a5..b4a4fe7fda2c423c6450ee513d3d127472c0b63e 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -325,6 +325,12 @@ class SlotsBuffer {
slots_[idx_++] = slot;
}
+ // Should be used for testing only.
+ ObjectSlot Get(intptr_t i) {
+ DCHECK(i >= 0 && i < kNumberOfElements);
+ return slots_[i];
+ }
+
enum SlotType {
EMBEDDED_OBJECT_SLOT,
OBJECT_SLOT,
@@ -374,14 +380,9 @@ class SlotsBuffer {
inline bool HasSpaceForTypedSlot() { return idx_ < kNumberOfElements - 1; }
- static void UpdateSlotsRecordedIn(Heap* heap, SlotsBuffer* buffer,
- bool code_slots_filtering_required) {
+ static void UpdateSlotsRecordedIn(Heap* heap, SlotsBuffer* buffer) {
while (buffer != NULL) {
- if (code_slots_filtering_required) {
- buffer->UpdateSlotsWithFilter(heap);
- } else {
buffer->UpdateSlots(heap);
- }
buffer = buffer->next();
}
}
@@ -420,6 +421,10 @@ class SlotsBuffer {
// before sweeping when mark bits are still intact.
static void RemoveInvalidSlots(Heap* heap, SlotsBuffer* buffer);
+ // Eliminate all slots that are within the given address range.
+ static void RemoveObjectSlots(Heap* heap, SlotsBuffer* buffer,
+ Address start_slot, Address end_slot);
+
// Ensures that there are no invalid slots in the chain of slots buffers.
static void VerifySlots(Heap* heap, SlotsBuffer* buffer);
@@ -741,13 +746,17 @@ class MarkCompactCollector {
bool IsSlotInLiveObject(Address slot);
void VerifyIsSlotInLiveObject(Address slot, HeapObject* object);
+ // Removes all the slots in the slot buffers that are within the given
+ // address range.
+ void RemoveObjectSlots(Address start_slot, Address end_slot);
+
private:
class SweeperTask;
explicit MarkCompactCollector(Heap* heap);
~MarkCompactCollector();
- bool MarkInvalidatedCode();
+ void RemoveDeoptimizedCodeSlots();
bool WillBeDeoptimized(Code* code);
void RemoveDeadInvalidatedCode();
void ProcessInvalidatedCode(ObjectVisitor* visitor);
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698