--- a/src/hotspot/share/runtime/sweeper.cpp Mon Oct 01 19:08:14 2018 +0200
+++ b/src/hotspot/share/runtime/sweeper.cpp Mon Oct 01 20:23:56 2018 +0200
@@ -335,7 +335,6 @@
VM_MarkActiveNMethods op;
VMThread::execute(&op);
}
- _should_sweep = true;
}
}
@@ -452,7 +451,7 @@
// allocations go to the non-profiled heap and we must be make sure that there is
// enough space.
double free_percent = 1 / CodeCache::reverse_free_ratio(CodeBlobType::MethodNonProfiled) * 100;
- if (free_percent <= StartAggressiveSweepingAt) {
+ if (free_percent <= StartAggressiveSweepingAt || forced || _should_sweep) {
do_stack_scanning();
}