Async-profiler: Support FlameScope format

Created on 17 Sep 2019  Â·  4Comments  Â·  Source: jvm-profiling-tools/async-profiler

It will be a huge improvement for performance analysis with FlameScope.

There is an implementation of FlameScope front, could you plan to provide data format support for FlameScope?

Most helpful comment

I made the converter that translates async-profiler output to nflxprofile format.
This makes possible to view profiles collected by async-profiler with FlameScope.

Usage:

java -jar converter.jar input.jfr output.nflx

However, I believe it's better to address the issue from the other side:

FlameScope should support .jfr profiles

Let me explain why.

  1. async-profiler already can produce JFR output - the profiles compatible with Java Flight Recorder. These files can be successfully loaded and analyzed in Java Mission Control.
  2. JFR format is richer than nflxprofile, and it's extensible.
  3. JFR format is streaming compatbile. It's possible to write JFR incrementally while profiler is running. nflxprofile can be written only after profiing is finished; it requires keeping all the data in memory.
  4. JFR is de facto standard, it is supported by Java community, not by a single vendor.
  5. Supporting JFR directly in FlameScope will make possible to analyze not only async-profiler results, but also profiles produced by Java Flight Recorder.
  6. FlameScope can already load a few different file types. If it also reads JFR directly, there'll be no need in the extra conversion step.

Therefore, if you are looking for a better integration of async-profiler and FlameScope, I suggest to
submit an issue in FlameScope project instead.

All 4 comments

My understanding is that Flamescope consumes files under the 'perf' file format so I guess this means async-profiler would become able to output 'perf' files. I'm wondering what is the benefit compared to running perf directly? Honest question, I've just found out about Flamescope (thanks to this issue) and might be missing something :)

@miaozhuojun , do you want FlameScope for every kind? alloc/ cpu/ etc. I will take a look at it over the holidays.

Are there any plans to support this? Either the ‘perf’ or ‘nflxprofile’ formats for cpu alone (mem would be nice too) would be really helpful so that it can interplay with the flame scope heat maps. With current flame graphs there is no insight into what a program was doing at any moment in time, however the pairing of heat map + flame graph let’s you analyze sub second cpu usage patterns.

The alternative to building it in is supplying a conversion script to run after profiling. I didn’t see any documentation on the format of the trace otherwise would love to hack a script together for it!

I made the converter that translates async-profiler output to nflxprofile format.
This makes possible to view profiles collected by async-profiler with FlameScope.

Usage:

java -jar converter.jar input.jfr output.nflx

However, I believe it's better to address the issue from the other side:

FlameScope should support .jfr profiles

Let me explain why.

  1. async-profiler already can produce JFR output - the profiles compatible with Java Flight Recorder. These files can be successfully loaded and analyzed in Java Mission Control.
  2. JFR format is richer than nflxprofile, and it's extensible.
  3. JFR format is streaming compatbile. It's possible to write JFR incrementally while profiler is running. nflxprofile can be written only after profiing is finished; it requires keeping all the data in memory.
  4. JFR is de facto standard, it is supported by Java community, not by a single vendor.
  5. Supporting JFR directly in FlameScope will make possible to analyze not only async-profiler results, but also profiles produced by Java Flight Recorder.
  6. FlameScope can already load a few different file types. If it also reads JFR directly, there'll be no need in the extra conversion step.

Therefore, if you are looking for a better integration of async-profiler and FlameScope, I suggest to
submit an issue in FlameScope project instead.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

egwepas picture egwepas  Â·  7Comments

ceeaspb picture ceeaspb  Â·  5Comments

ceeaspb picture ceeaspb  Â·  6Comments

MaXal picture MaXal  Â·  5Comments

franz1981 picture franz1981  Â·  8Comments