javaflame - Capture function arguments, visualize them in a flamegraph

Abstract

javaflame is a simple general debugging tool, focusing on investigation. Its advantage is the ability to capture all argument values.

Do not use on production, as it’s really memory hungry. Not used for measuring performance.

To use it:

  • download the agent
  • add to the JVM command line
java -javaagent:javaflame.jar -jar yourjar.jar some-arguments

You can add filters to reduce the noise:

java -javaagent:javaflame.jar=filter:com.example -jar yourjar.jar some-arguments
java -javaagent:javaflame.jar=filter:(example&&cakeFactory)||(com.foobar) -jar yourjar.jar some-arguments
java -javaagent:javaflame.jar=filter:(!org.springframework)&&(!org.hibernate) -jar yourjar.jar some-arguments
java -javaagent:javaflame.jar=filter:org.postgresql.jdbc.PgConnection#prepareStatement -jar yourjar.jar some-arguments
# For checking relationships between your code and 3rd party dependency.
java -javaagent:javaflame.jar=filter:(com.example)||(org.postgresql.jdbc.PgConnection#prepareStatement) -jar yourjar.jar some-arguments