Chromium Code Reviews

Unified Diff: src/heap/objects-visiting-inl.h

Issue 1483993002: [heap] Aggressive code flushing in GC stress mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-code-flushing-1
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/objects-visiting-inl.h
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h
index 3be5ce321b1398b4557d2f2c2ab8e5234a6e8610..51f7c7ad8147b7dabeff9b8b5c3eac3ed7048dc8 100644
--- a/src/heap/objects-visiting-inl.h
+++ b/src/heap/objects-visiting-inl.h
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine