Try enabling (non-incremental) code compaction again.

This time include slot-recording fixes in code flushing that were accidentally omitted from the previous commit.

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9348018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vegorov@chromium.org 2012-02-07 14:43:51 +00:00
parent 889966a456
commit 99fa8059c3
2 changed files with 12 additions and 1 deletions

View File

@ -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 "

View File

@ -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);