Commit 28a3f23e authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[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}
parent c0ec16e5
...@@ -627,11 +627,6 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(Heap* heap, ...@@ -627,11 +627,6 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(Heap* heap,
return false; return false;
} }
// Check age of optimized code.
if (FLAG_age_code && !function->code()->IsOld()) {
return false;
}
return IsFlushable(heap, shared_info); return IsFlushable(heap, shared_info);
} }
...@@ -690,6 +685,16 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable( ...@@ -690,6 +685,16 @@ bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(
return false; 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. // Check age of code. If code aging is disabled we never flush.
if (!FLAG_age_code || !shared_info->code()->IsOld()) { if (!FLAG_age_code || !shared_info->code()->IsOld()) {
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment