1

I've generated a .jfr file with

mvn test -Dtest=DataRunnerIT -DargLine="XX:StartFlightRecording,filename=flight.jfr"

I can confirm that the .jfr file is ok because I've opened it with the Profiler of IntelliJ IDEA Ultimate and the graph is properly rendered.

Now I would like to see this flame graph with a free tool but I can't have it rendered, see below. What am I doing wrong ?

JMC

I've installed JDK 17 Amazon Corretto (on Ubunutu 22.04) and there is no jmc in /bin, which is apparently normal. I've downloaded JMC from jdk.java.net/jmc/8/ and added these lines to the native jmc.ini, as mentioned in the doc:

-vm
/usr/lib/jvm/java-17-amazon-corretto/bin

I can start JMC and open my .jfr file. Some graphs are displayed but the flame graph at the bottom remains blank: JDK Mission Control

FlameViewer

Using the FlameViewer IntelliJ plugin when I upload my .jfr file I get File was not sent, tested with Firefox and Chromium: enter image description here EDIT: I've just discovered these logs related to FlameViewer:

java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "stacks" is null
    at com.github.kornilova203.flameviewer.converters.cflamegraph.JfrToStacksConverter.removePackageInParameters(JfrToStacksConverter.java:34)
ThCollignon
  • 976
  • 3
  • 14
  • 31

1 Answers1

0

It could be a problem related to the SWT browser component.

Do you get anything on the console from JMC? Any exceptions? Does any of the other views that are based on the browser component work (like the graph view, or the hierarchical edge bundling view)? If none of the other browser based views work, then it's likely a problem with getting the SWT Browser component to work.

See if this helps: https://www.eclipse.org/swt/faq.php#browserlinux.

Hirt
  • 1,664
  • 10
  • 12
  • 1
    In the console nothing relevant except `OpenJDK 64-Bit Server VM warning: Option FlightRecorder was deprecated (...)`. I confirm that Graph View and Heatmap View both don't work neither. I haven't found the hierarchical edge bundling view. Your link is about running SWT inside Eclipse, while I run standalone JMC. Still I've tried: - Installing WebKitGTK: `libwebkit2gtk-4.0-37 is already the newest version (2.38.5-0ubuntu0.22.04.1)` - Adding `-Dorg.eclipse.swt.browser.DefaultType=chromium` in `jmc.ini` has no effect. – ThCollignon Apr 05 '23 at 06:22
  • 1
    Not sure why the browser component does not work for you. That said, for the Flame Graph, this will at least be fixed in JMC 9 by this work: https://github.com/openjdk/jmc/pull/408. – Hirt Apr 17 '23 at 20:50