8168305: GC.class_stats should not require -XX:+UnlockDiagnosticVMOptions
authorsla
Fri, 28 Oct 2016 08:40:35 +0200
changeset 42075 e5b263ac8c2e
parent 42074 c069e5e285cb
child 42077 ff3dd31ee8c2
8168305: GC.class_stats should not require -XX:+UnlockDiagnosticVMOptions Reviewed-by: rehn, mlarsson, iklam
hotspot/src/share/vm/services/diagnosticCommand.cpp
hotspot/src/share/vm/services/diagnosticCommand.hpp
hotspot/test/serviceability/sa/TestInstanceKlassSize.java
hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp	Fri Oct 14 14:47:01 2016 -0700
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp	Fri Oct 28 08:40:35 2016 +0200
@@ -551,11 +551,6 @@
 }
 
 void ClassStatsDCmd::execute(DCmdSource source, TRAPS) {
-  if (!UnlockDiagnosticVMOptions) {
-    output()->print_cr("GC.class_stats command requires -XX:+UnlockDiagnosticVMOptions");
-    return;
-  }
-
   VM_GC_HeapInspection heapop(output(),
                               true /* request_full_gc */);
   heapop.set_csv_format(_csv.value());
@@ -996,8 +991,8 @@
 {}
 
 void TouchedMethodsDCmd::execute(DCmdSource source, TRAPS) {
-  if (!UnlockDiagnosticVMOptions) {
-    output()->print_cr("VM.touched_methods command requires -XX:+UnlockDiagnosticVMOptions");
+  if (!LogTouchedMethods) {
+    output()->print_cr("VM.print_touched_methods command requires -XX:+LogTouchedMethods");
     return;
   }
   VM_DumpTouchedMethods dumper(output());
--- a/hotspot/src/share/vm/services/diagnosticCommand.hpp	Fri Oct 14 14:47:01 2016 -0700
+++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp	Fri Oct 28 08:40:35 2016 +0200
@@ -386,7 +386,7 @@
     return "GC.class_stats";
   }
   static const char* description() {
-    return "Provide statistics about Java class meta data. Requires -XX:+UnlockDiagnosticVMOptions.";
+    return "Provide statistics about Java class meta data.";
   }
   static const char* impact() {
     return "High: Depends on Java heap size and content.";
--- a/hotspot/test/serviceability/sa/TestInstanceKlassSize.java	Fri Oct 14 14:47:01 2016 -0700
+++ b/hotspot/test/serviceability/sa/TestInstanceKlassSize.java	Fri Oct 28 08:40:35 2016 +0200
@@ -98,7 +98,6 @@
         OutputAnalyzer output = null;
         try {
             List<String> vmArgs = new ArrayList<String>();
-            vmArgs.add("-XX:+UnlockDiagnosticVMOptions");
             vmArgs.add("-XX:+UsePerfData");
             vmArgs.addAll(Utils.getVmOptions());
             app = LingeredApp.startApp(vmArgs);
--- a/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java	Fri Oct 14 14:47:01 2016 -0700
+++ b/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java	Fri Oct 28 08:40:35 2016 +0200
@@ -45,7 +45,6 @@
  *          --add-exports=jdk.hotspot.agent/sun.jvm.hotspot.debugger=ALL-UNNAMED
  *          TestInstanceKlassSizeForInterface.java
  * @run main/othervm
- *          -XX:+UnlockDiagnosticVMOptions
  *          --add-modules=jdk.hotspot.agent
  *          --add-exports=jdk.hotspot.agent/sun.jvm.hotspot=ALL-UNNAMED
  *          --add-exports=jdk.hotspot.agent/sun.jvm.hotspot.utilities=ALL-UNNAMED