async-profiler: Async Profiler and Java Flight Recorder are missing some methods at the bottom of the stack.

From a code perspective, the correct call order should be: Thread.run -> FastThreadLocalRunnable.run -> ThreadPoolExecutor$Worker.run -> ThreadPoolExecutor.runWorker

✅using jstack: image

❌using async profiler:

image

❌using jfr ExecutionSample event: image

This doesn’t seem to be a bug with async profiler, any thoughts?

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 16

Most upvoted comments

Yes, DebugNonSafepoints option may affect accuracy of the topmost virtual frames, but not a frame at the bottom of the stack.

Depends. If there is a safepoint poll within an inlined method, jstack can still observe (and blame it), while, without the option I’ve specified, both jfr and async profiler won’t be able to do the same (loop striping can still add polls to counted loops). Regarding your method: are you using CPU profiling? If yes, jstack has captured a WAITING thread which is not something a CPU profiler would show up, because…it doesn’t consume CPU (unless in the precess of contending on some process futex to do it).