[heap] Aggressive code flushing in GC stress mode.

This disregards the code age heuristic when deciding whether to flush
code so that GC stress mode is more likely to flush out potential races
between our various "invariants".

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/1483993002

Cr-Commit-Position: refs/heads/master@{#32414}
This commit is contained in:
mstarzinger 2015-11-30 09:24:06 -08:00 committed by Commit bot
parent c0ec16e559
commit 28a3f23e50

View File

@ -627,11 +627,6 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(Heap* heap,
return false;
}
// Check age of optimized code.
if (FLAG_age_code && !function->code()->IsOld()) {
return false;
}
return IsFlushable(heap, shared_info);
}
@ -690,6 +685,16 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(
return false;
}
// ----------------------------------------------------------------
// The above predicates up to this line are hard invariants, below
// this line are heuristics that should not affect correctness.
// ----------------------------------------------------------------
// In stress mode we are aggressive.
if (FLAG_stress_compaction) {
return true;
}
// Check age of code. If code aging is disabled we never flush.
if (!FLAG_age_code || !shared_info->code()->IsOld()) {
return false;