I am using Oracle Java Flight Recorder to collect stack trace samples of a Java application. Theses stack traces allows me to eventually produce a CPU Flamegraph.
My issue is that stack traces deeper than 64 frames are truncated by Java Flight Recorder. It's very easy to observe in the Flamegraph and using a debugger I can observe that no FLRStackTrace
has more than 64 FLRFrame
s and that almost all stack traces with 64 frames have their TruncationState set to TRUNCATED
.
Does anyone know if this 64 frames limit can be increased ? Flamegraphs are useless if the stack traces are incomplete.
Java Flight Recorder (JFR) is a tool for collecting, diagnosing, and profiling data about a running Java application. It is integrated into the Java Virtual Machine (JVM) and causes almost no performance overhead, so it can be used even in heavily loaded production environments.
JFR collects data from the JVM (through internal APIs) and from the Java application (through the JFR APIs). This data is stored in small thread-local buffers that are flushed to a global in-memory buffer. Data in the global in-memory buffer is then written to disk.
Yep! But not if you're running on JRockit. If running on HotSpot, simply use the flag -XX:FlightRecorderOptions=stackdepth=<n>
, where n, as you have discovered, defaults to 64.
More info here: http://hirt.se/blog/?p=364
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With