publicstaticvoid main(String[] args) throws Exception {
System.loadLibrary(args[0]); final HashMap<TestObject, Long> map = new HashMap<TestObject, Long>();
// Single-frame deoptimization that covers partial fragment.
execute(new Runnable() { publicvoid run() { int[] arr = newint[3]; int res = $noinline$run1(arr); if (res != 79) {
System.out.println("Failure 1!");
System.exit(0);
}
}
});
// Single-frame deoptimization that covers a full fragment.
execute(new Runnable() { publicvoid run() { try { int[] arr = newint[3]; // Use reflection to call $noinline$run2 so that it does // full-fragment deoptimization since that is an upcall. Class<?> cls = Class.forName("Main");
Method method = cls.getDeclaredMethod("$noinline$run2", int[].class); double res = (double)method.invoke(Main.class, arr); if (res != 79.3d) {
System.out.println("Failure 2!");
System.exit(0);
}
} catch (Exception e) {
e.printStackTrace(System.out);
}
}
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.