Skip to content

Instantly share code, notes, and snippets.

Last active February 20, 2023 11:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Tiny self-contained reproducer for (AsyncGetCallTrace obtains too few frames in sanity test)
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class Main {
public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
Class<?> klass = Main.class;
Method mainMethod = klass.getMethod("test");
public static void test() {
public static void javaLoop() {
long start = System.currentTimeMillis();
while (start + 3000 > System.currentTimeMillis());
java -cp . -XX:StartFlightRecording=filename=profile.jfr Main
jfr print --events "jdk.ExecutionSample" --json profile.jfr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment