diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp index d1e12526066880c962929c0ce7ed94d7a7541277..d4306725f0ea7e00cd3dad9f339a9ddc42e1ae70 100644 --- a/src/share/vm/runtime/globals.hpp +++ b/src/share/vm/runtime/globals.hpp @@ -3990,6 +3990,14 @@ class CommandLineFlags { "Use the FP register for holding the frame pointer " \ "and not as a general purpose register.") \ \ + product(bool, EnableTracing, false, \ + "Enable event-based tracing" \ + "Deprecated: use FlightRecorder instead") \ + \ + product(bool, UseLockedTracing, false, \ + "Use locked-tracing when doing event-based tracing" \ + "Deprecated: use FlightRecorder instead") \ + \ JFR_ONLY(product(bool, FlightRecorder, false, \ "Enable Flight Recorder")) \ \ diff --git a/test/runtime/EnableTracing/TestEnableTracing.java b/test/runtime/EnableTracing/TestEnableTracing.java index 9b2ad48d5c5ca8501163eff82e8b4537533a28ee..c2b50cef0ba62150bc81290f2d39126d05f02ce5 100644 --- a/test/runtime/EnableTracing/TestEnableTracing.java +++ b/test/runtime/EnableTracing/TestEnableTracing.java @@ -33,24 +33,13 @@ import com.oracle.java.testlibrary.ProcessTools; import com.oracle.java.testlibrary.OutputAnalyzer; public class TestEnableTracing { - public static final String OPENJDK_MARK = "OpenJDK"; - public static void main(String[] args) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+EnableTracing", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); - if (output.getStderr().contains(OPENJDK_MARK)) { - output.shouldMatch("^Class Load"); - output.shouldContain("Loaded Class ="); // verify TraceStream print_val Klass* - } output.shouldHaveExitValue(0); pb = ProcessTools.createJavaProcessBuilder("-XX:+EnableTracing", "-XX:+UseLockedTracing", "-Xcomp ", "-version"); output = new OutputAnalyzer(pb.start()); - if (output.getStderr().contains(OPENJDK_MARK)) { - output.shouldMatch("^Class Load"); - output.shouldMatch("^Compilation"); - output.shouldContain("Java Method ="); // verify TraceStream print_val Method* - } output.shouldHaveExitValue(0); } } diff --git a/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java b/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java index 1327bd30da5ee2b391961cc235d7e84fadf45e2d..909e09f9d9c4d8109b7729b28eb2791454a4bbda 100644 --- a/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java +++ b/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java @@ -76,6 +76,7 @@ public class WhiteBox { // Memory public native long getObjectAddress(Object o); public native int getHeapOopSize(); + public native long getHeapAlignment(); public native int getVMPageSize(); public native long getVMLargePageSize(); @@ -160,7 +161,12 @@ public class WhiteBox { public boolean enqueueMethodForCompilation(Executable method, int compLevel) { return enqueueMethodForCompilation(method, compLevel, -1 /*InvocationEntryBci*/); } - public native boolean enqueueMethodForCompilation(Executable method, int compLevel, int entry_bci); + public boolean enqueueMethodForCompilation(Executable method, int compLevel, int entry_bci) { + return enqueueMethodForCompilation0(method, compLevel, entry_bci); + } + + public native boolean enqueueInitializerForCompilation0(Class clazz, int compLevel); + public native boolean enqueueMethodForCompilation0(Executable method, int compLevel, int entry_bci); public native void clearMethodState(Executable method); public native void markMethodProfiled(Executable method); public native int getMethodEntryBci(Executable method); @@ -171,6 +177,9 @@ public class WhiteBox { // Memory public native void readReservedMemory(); + public native long allocateCodeBlob(int size, int blobType); + public native void freeCodeBlob(long address); + public native Object[] getCodeBlob(long address); public native long allocateMetaspace(ClassLoader classLoader, long size); public native void freeMetaspace(ClassLoader classLoader, long addr, long size); public native long incMetaspaceCapacityUntilGC(long increment);