KEMBAR78
Converter enhancements · Issue #905 · async-profiler/async-profiler · GitHub
Skip to content

Converter enhancements #905

@apangin

Description

@apangin

The profile converter (formerly converter.jar) has undergone significant refactoring.
Here is the list of most important changes.

  1. Converter is now bundled as an executable binary jfrconv, see Binary converter #895.
  2. converter.jar has been renamed to jfr-converter.jar; it is no longer bundled in the profiler package, but can be downloaded separately.
  3. Minimal required JDK version to run converter is now JDK 8.
  4. Top level converter classes have been moved to one.converter package to allow access from third-party packages.
  5. A single Main class now handles all types of conversions instead of separate jfr2flame, jfr2pprof, etc.
  6. Input and output format is automatically detected basing on a file extension or contents.
  7. Multiple source files can be converted with one command, e.g.
    jfrconv -o html *.collapsed .
  8. Output parameter can be a file name, a directory name, or can be omitted entirely when only one input file is specified:
    jfrconv input.jfr
  9. For each input file, converter prints input file name, output file name and conversion duration.
  10. JFR to pprof converter has been rewritten from scratch. It now works faster, produces accurate and compatible pprof files much smaller in size. The issue with disproportionate frames has been solved.
  11. Added support for allocation and lock profiles in pprof format.
  12. JFR-to-pprof converter now accepts the same arguments as JFR-to-html: --alloc, --threads, --classify, --from/--to, --include/--exclude, etc.
  13. An option to produce gzip-compressed pprof files: -o pb.gz.
  14. Flame graph colors now exactly correspond to frame types in JFR source (e.g., previously, C++ frames were sometimes displayed in red instead of yellow).
  15. Support HTML flame graph as an input format. Flame graph can be converted to .collapsed format or re-converted to .html with different options, e.g., reversed (-r) or filtered (-I/-X).
  16. Removed .nflx output. Support for better heatmaps will come soon.
  17. Added --cpu and --wall options as shortcuts for --state DEFAULT and --state RUNNABLE,SLEEPING.
  18. One-letter aliases: -r == --reverse, -t == --threads, -X == --exclude, etc.
  19. States can be abbreviated, e.g. -s r == --state RUNNABLE.
  20. Fixed handling of heterogeneous and concatenated JFR files.
  21. Improved conversion speed.

So far, the following conversions are supported:

  • collapsed -> html, collapsed
  • html -> html, collapsed
  • jfr -> html, collapsed, pprof, pb.gz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions