提交 a301faab 编写于 作者: N neugens

8230707: JFR related tests are failing

Reviewed-by: shade, andrew
上级 348f2314
......@@ -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")) \
\
......
......@@ -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);
}
}
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册