How do you change the stack depth size when attaching the Java profiler to a running process?
When I'm attaching the Java Profiler (the Java Flight Recorder) to an already running application (Run > Attach Profiler to process) the following message is displayed: "Flight Recorder VM options can't be changed at runtime. Existing options will be used" and a message saying the stack depth is set to 64.
This stack depth renders the flame graphs rather useless, as a lot of stack entries are truncated.
How can I change the existing options or the stack depth?
I tried setting the Java Profiler options to Profile in the Settings, but that does not seem to make a difference. The Profiling VM Options are set to stackdepth=2048.
Thanks a lot!
Best
Matthias
IntelliJ IDEA 2020.2 (Ultimate Edition)
Build #IU-202.6397.94, built on July 27, 2020
Runtime version: 11.0.7+10-b944.20 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Please sign in to leave a comment.
Hello!
There is a bug in JDK which prevents using custom stackdepth. The only workaround at the moment is to set needed stackdepth at application startup.