This is built on a Linux sampling API that offers more accuracy, but it is still sampling.

For CPU tracing, with no sampling errors, use Apple’s M4 with the latest Xcode’s Instruments.

(author here)

Xcode doesn't know about Java's internals, so it doesn't know about Java frames, although it can help with native traces.