Reviewers: Michael Starzinger,
Description:
Try enabling (non-incremental) code compaction again.
This time include slot-recording fixes in code flushing that were
accidentally
omitted from the previous commit.
[email protected]
Please review this at https://chromiumcodereview.appspot.com/9348018/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/flag-definitions.h
M src/mark-compact.cc
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
50086fb7f45dad6bfcabe2f2fed00df7fb41c345..b1bd74b8fc8f5ba15ae7f31389e16221f917c21e
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -307,7 +307,7 @@ DEFINE_bool(cleanup_caches_in_maps_at_gc, true,
"Flush code caches in maps during mark compact cycle.")
DEFINE_bool(never_compact, false,
"Never perform compaction on full GC - testing only")
-DEFINE_bool(compact_code_space, false,
+DEFINE_bool(compact_code_space, true,
"Compact code space on full non-incremental collections")
DEFINE_bool(cleanup_code_caches_at_gc, true,
"Flush inline caches prior to mark compact collection and "
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index
bc7985ea5f3e148197847a48ab780cc621affcfa..40333fe1f838037fe4822f067a010fbc1032045a
100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -809,6 +809,8 @@ class CodeFlusher {
isolate_->heap()->mark_compact_collector()->
RecordCodeEntrySlot(slot, target);
+ RecordSharedFunctionInfoCodeSlot(shared);
+
candidate = next_candidate;
}
@@ -831,12 +833,21 @@ class CodeFlusher {
candidate->set_code(lazy_compile);
}
+ RecordSharedFunctionInfoCodeSlot(candidate);
+
candidate = next_candidate;
}
shared_function_info_candidates_head_ = NULL;
}
+ void RecordSharedFunctionInfoCodeSlot(SharedFunctionInfo* shared) {
+ Object** slot = HeapObject::RawField(shared,
+ SharedFunctionInfo::kCodeOffset);
+ isolate_->heap()->mark_compact_collector()->
+ RecordSlot(slot, slot, HeapObject::cast(*slot));
+ }
+
static JSFunction** GetNextCandidateField(JSFunction* candidate) {
return reinterpret_cast<JSFunction**>(
candidate->address() + JSFunction::kCodeEntryOffset);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev