8233659: [TESTBUG] runtime/cds/appcds/CommandLineFlagCombo.java fails when jfr is disabled
authorjiefu
Wed, 06 Nov 2019 13:43:25 +0800
changeset 58944 bb2a436e616c
parent 58943 e940d13a2ed3
child 58945 a3b046720c3b
8233659: [TESTBUG] runtime/cds/appcds/CommandLineFlagCombo.java fails when jfr is disabled Reviewed-by: iklam
test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagCombo.java
--- a/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagCombo.java	Tue Nov 05 20:27:21 2019 -0800
+++ b/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagCombo.java	Wed Nov 06 13:43:25 2019 +0800
@@ -44,6 +44,7 @@
 import jdk.test.lib.process.OutputAnalyzer;
 
 import sun.hotspot.code.Compiler;
+import sun.hotspot.WhiteBox;
 
 public class CommandLineFlagCombo {
 
@@ -128,6 +129,12 @@
             return true;
         }
 
+        if (!WhiteBox.getWhiteBox().isJFRIncludedInVmBuild() && testEntry.equals("-XX:+FlightRecorder"))
+        {
+            System.out.println("JFR does not exist");
+            return true;
+        }
+
         return false;
     }
 }