8186902: jcmd GC.run should not be blocked by DisableExplicitGC

Reviewed-by: mgerdin, sspitsyn
This commit is contained in:
Kevin Walls 2017-09-01 01:03:20 -07:00
parent 1d5aeeb5f1
commit 4309aa8780

View File

@ -414,11 +414,7 @@ void VMInfoDCmd::execute(DCmdSource source, TRAPS) {
}
void SystemGCDCmd::execute(DCmdSource source, TRAPS) {
if (!DisableExplicitGC) {
Universe::heap()->collect(GCCause::_dcmd_gc_run);
} else {
output()->print_cr("Explicit GC is disabled, no GC has been performed.");
}
Universe::heap()->collect(GCCause::_dcmd_gc_run);
}
void RunFinalizationDCmd::execute(DCmdSource source, TRAPS) {