changeset 1035:db42cb5e9439

7901102: perfasm gets confused because PrintCompilation, PrintInlining output
author shade
date Fri, 14 Nov 2014 01:20:54 +0300
parents 8b8583c12c66
children ac23d8538728
files jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Fri Nov 14 00:58:31 2014 +0300
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Fri Nov 14 01:20:54 2014 +0300
@@ -146,9 +146,10 @@
     private static final String SAVE_LOG_OUTPUT_TO_FILE = System.getProperty("jmh.perfasm.saveLogToFile");
 
     /**
-     * Skip tracing the classloading events.
+     * Print the collateral compilation information.
+     * Enabling this might corrupt the assembly output, see https://bugs.openjdk.java.net/browse/CODETOOLS-7901102
      */
-    private static final Boolean SKIP_TRACE_CL = Boolean.getBoolean("jmh.perfasm.skipTraceClassload");
+    private static final Boolean PRINT_COMPILATION_INFO = Boolean.getBoolean("jmh.perfasm.printCompilationInfo");
 
     /**
      * Override the default assembly syntax
@@ -178,10 +179,10 @@
                     "-XX:+UnlockDiagnosticVMOptions",
                     "-XX:+LogCompilation",
                     "-XX:LogFile=" + hsLog,
-                    "-XX:+PrintAssembly",
-                    "-XX:+PrintCompilation",
-                    "-XX:+PrintInlining"));
-            if (!SKIP_TRACE_CL) {
+                    "-XX:+PrintAssembly"));
+            if (PRINT_COMPILATION_INFO) {
+                opts.add("-XX:+PrintCompilation");
+                opts.add("-XX:+PrintInlining");
                 opts.add("-XX:+TraceClassLoading");
             }
             if (ASSEMBLY_SYNTAX != null) {