From 4309aa8780084392e2ffa237163fa96f2ac25806 Mon Sep 17 00:00:00 2001
From: Kevin Walls <kevinw@openjdk.org>
Date: Fri, 1 Sep 2017 01:03:20 -0700
Subject: [PATCH] 8186902: jcmd GC.run should not be blocked by
 DisableExplicitGC

Reviewed-by: mgerdin, sspitsyn
---
 hotspot/src/share/vm/services/diagnosticCommand.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/hotspot/src/share/vm/services/diagnosticCommand.cpp b/hotspot/src/share/vm/services/diagnosticCommand.cpp
index 8a7339bcad5..4d91e7da8a7 100644
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp
@@ -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) {