I'd like to collect stacktraces from my Java app for creating CPU Flame Graphs for profiling.
This is very similar to this question: How to get complete stack dump from profiler in every sample for use in flame graph? with 2 differences:
- I work with Java code and I need Java stacktraces
- I'm working on Mac (this means there is no
pref
and AFAIKdtrace
on OSX doesn't supportjstack
extension).
I have already tried lightweight-java-profiler and Honest profiler, and both of them don't seem to work on Mac. I also Tried VisualVM, but I couldn't get it to produce the stacktrace dumps that I needed.
First prioirty for me are flame graphs generated from Java stacktraces, but having the native call stack as well would be great, because it would let me address the I/O issues (and maybe even generate hot/cold flame graphs).