Skip to content

Instantly share code, notes, and snippets.

@afirth
Created January 9, 2020 09:12
Show Gist options
  • Save afirth/181254319f01c5a87c01aa6536956ab3 to your computer and use it in GitHub Desktop.
Save afirth/181254319f01c5a87c01aa6536956ab3 to your computer and use it in GitHub Desktop.
profile java w flamegraphs
#openjdk11:
#https://blog.codecentric.de/en/2017/09/jvm-fire-using-flame-graphs-analyse-performance/
#https://www.slideshare.net/brendangregg
sudo apt-install openjfx
java --module-path /usr/share/openjfx/lib --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -cp ~/honest-profiler/honest-profiler.jar com.insightfullogic.honest_profiler.ports.console.FlameGraphDumperApplication ~/Downloads/honest-profiler-log-05.hpl ~/Downloads/honest-profiler-log-05.folded
git clone --depth 1 https://github.com/brendangregg/FlameGraph
cd FlameGraph
# just some prefixes
grep 'io.zeebe' ~/Downloads/honest-profiler-log-05.folded | ./flamegraph.pl > /tmp/flame_`date +%s`.svg
# cut some bits out and make a time chart instead
tail -n 1000 ~/Downloads/honest-profiler-log-05.folded.short | head -n50 | ./flamegraph.pl --width=8000 --flamechart > /tmp/flame_`date +%s`.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment