Mon, 17 Feb 2020 10:32:35 +0100
8230707: JFR related tests are failing
Reviewed-by: shade, andrew
1.1 --- a/src/share/vm/runtime/globals.hpp Fri Feb 14 17:13:16 2020 +0100 1.2 +++ b/src/share/vm/runtime/globals.hpp Mon Feb 17 10:32:35 2020 +0100 1.3 @@ -3990,6 +3990,14 @@ 1.4 "Use the FP register for holding the frame pointer " \ 1.5 "and not as a general purpose register.") \ 1.6 \ 1.7 + product(bool, EnableTracing, false, \ 1.8 + "Enable event-based tracing" \ 1.9 + "Deprecated: use FlightRecorder instead") \ 1.10 + \ 1.11 + product(bool, UseLockedTracing, false, \ 1.12 + "Use locked-tracing when doing event-based tracing" \ 1.13 + "Deprecated: use FlightRecorder instead") \ 1.14 + \ 1.15 JFR_ONLY(product(bool, FlightRecorder, false, \ 1.16 "Enable Flight Recorder")) \ 1.17 \
2.1 --- a/test/runtime/EnableTracing/TestEnableTracing.java Fri Feb 14 17:13:16 2020 +0100 2.2 +++ b/test/runtime/EnableTracing/TestEnableTracing.java Mon Feb 17 10:32:35 2020 +0100 2.3 @@ -33,24 +33,13 @@ 2.4 import com.oracle.java.testlibrary.OutputAnalyzer; 2.5 2.6 public class TestEnableTracing { 2.7 - public static final String OPENJDK_MARK = "OpenJDK"; 2.8 - 2.9 public static void main(String[] args) throws Exception { 2.10 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+EnableTracing", "-version"); 2.11 OutputAnalyzer output = new OutputAnalyzer(pb.start()); 2.12 - if (output.getStderr().contains(OPENJDK_MARK)) { 2.13 - output.shouldMatch("^Class Load"); 2.14 - output.shouldContain("Loaded Class ="); // verify TraceStream print_val Klass* 2.15 - } 2.16 output.shouldHaveExitValue(0); 2.17 2.18 pb = ProcessTools.createJavaProcessBuilder("-XX:+EnableTracing", "-XX:+UseLockedTracing", "-Xcomp ", "-version"); 2.19 output = new OutputAnalyzer(pb.start()); 2.20 - if (output.getStderr().contains(OPENJDK_MARK)) { 2.21 - output.shouldMatch("^Class Load"); 2.22 - output.shouldMatch("^Compilation"); 2.23 - output.shouldContain("Java Method ="); // verify TraceStream print_val Method* 2.24 - } 2.25 output.shouldHaveExitValue(0); 2.26 } 2.27 }
3.1 --- a/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Fri Feb 14 17:13:16 2020 +0100 3.2 +++ b/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java Mon Feb 17 10:32:35 2020 +0100 3.3 @@ -76,6 +76,7 @@ 3.4 // Memory 3.5 public native long getObjectAddress(Object o); 3.6 public native int getHeapOopSize(); 3.7 + public native long getHeapAlignment(); 3.8 public native int getVMPageSize(); 3.9 public native long getVMLargePageSize(); 3.10 3.11 @@ -160,7 +161,12 @@ 3.12 public boolean enqueueMethodForCompilation(Executable method, int compLevel) { 3.13 return enqueueMethodForCompilation(method, compLevel, -1 /*InvocationEntryBci*/); 3.14 } 3.15 - public native boolean enqueueMethodForCompilation(Executable method, int compLevel, int entry_bci); 3.16 + public boolean enqueueMethodForCompilation(Executable method, int compLevel, int entry_bci) { 3.17 + return enqueueMethodForCompilation0(method, compLevel, entry_bci); 3.18 + } 3.19 + 3.20 + public native boolean enqueueInitializerForCompilation0(Class clazz, int compLevel); 3.21 + public native boolean enqueueMethodForCompilation0(Executable method, int compLevel, int entry_bci); 3.22 public native void clearMethodState(Executable method); 3.23 public native void markMethodProfiled(Executable method); 3.24 public native int getMethodEntryBci(Executable method); 3.25 @@ -171,6 +177,9 @@ 3.26 3.27 // Memory 3.28 public native void readReservedMemory(); 3.29 + public native long allocateCodeBlob(int size, int blobType); 3.30 + public native void freeCodeBlob(long address); 3.31 + public native Object[] getCodeBlob(long address); 3.32 public native long allocateMetaspace(ClassLoader classLoader, long size); 3.33 public native void freeMetaspace(ClassLoader classLoader, long addr, long size); 3.34 public native long incMetaspaceCapacityUntilGC(long increment);