Async-profiler: comparison with Honest Profiler

Created on 27 Dec 2017  路  6Comments  路  Source: jvm-profiling-tools/async-profiler

I was wondering if there is any documented comparison of Honest Profiler vs. Async Profiler. I can see from the README that Async Profiler offers some features like heap profiling that are not present in Honest Profiler. OTOH, Honest Profiler has a GUI interface that I don't see in Async Profiler. It would be awesome if there were a high-level comparison in the README somewhere, indicating when each tool is most appropriate, differences in approach, etc. I think many users will have this question, given that both tools live in the jvm-profiling-tools GitHub namespace.

Thanks for all the awesome work! Very excited to try out Async Profiler on our code base.

question

Most helpful comment

Thank you for your interest in Async-profiler!

I'm not going to compare AP to HP in the documentation for several reasons (this won't be impartial anyway), but I'd like to write a blog post about the motivation of AP: why another tool was needed when there were already Honest Profiler and perf + Flame Graphs.

Meanwhile, before the post is out, I can highlight the main advantages of Async-profiler from my point of view:

  • It samples all running code: not only Java, but native, JVM and even kernel functions, too.
  • It has workarounds for annoying AsyncGetCallTrace bugs (see JDK-8178287). Async-profiler can show correct stack traces in the cases when other tools just fail with "AGCT::Unknown Java[ERR=-5]".
  • Besides CPU profiling, it supports other profiling events like heap allocations, contended locks, perf events, kernel tracepoints.
  • Attach-on-demand capability: it is not necessary to include the agent at application launch time.

However, what I like about Honest Profiler is its infrastructure around collecting and presenting data, including the GUI. In contrast, Async-profiler has just a command-line interface and a couple of output formats that can be visualized with external utilities like Flame Graph. This is not the primary direction of development, I'm not going to spend much time on it, but I'll be glad to accept contributions on the visualization side.

All 6 comments

Thank you for your interest in Async-profiler!

I'm not going to compare AP to HP in the documentation for several reasons (this won't be impartial anyway), but I'd like to write a blog post about the motivation of AP: why another tool was needed when there were already Honest Profiler and perf + Flame Graphs.

Meanwhile, before the post is out, I can highlight the main advantages of Async-profiler from my point of view:

  • It samples all running code: not only Java, but native, JVM and even kernel functions, too.
  • It has workarounds for annoying AsyncGetCallTrace bugs (see JDK-8178287). Async-profiler can show correct stack traces in the cases when other tools just fail with "AGCT::Unknown Java[ERR=-5]".
  • Besides CPU profiling, it supports other profiling events like heap allocations, contended locks, perf events, kernel tracepoints.
  • Attach-on-demand capability: it is not necessary to include the agent at application launch time.

However, what I like about Honest Profiler is its infrastructure around collecting and presenting data, including the GUI. In contrast, Async-profiler has just a command-line interface and a couple of output formats that can be visualized with external utilities like Flame Graph. This is not the primary direction of development, I'm not going to spend much time on it, but I'll be glad to accept contributions on the visualization side.

Cool thanks! I'd definitely be interested in a blog post but your comment is already quite helpful. We can leave this issue open until the blog post is up or just close it; either is fine with me.

Yep! That was my intent, too: the open issue will be an additional trigger for me to finish the post some time soon :)

@apangin Andrey hey! Do you have any progress with a blog post?

@zagorulkinde Here are the materials from my presentation at CodeOne: https://github.com/apangin/codeone2019-java-profiling
Unfortunately, the talk was not recorded, but I plan to make an article from it.

I've finally held a recorded webinar about async-profiler - 3.5 hours long!
https://www.youtube.com/playlist?list=PLNCLTEx3B8h4Yo_WvKWdLvI9mj1XpTKBr
Materials and code examples are available here.

This question is almost 3 year old now - so many things has changed during this time.

  • UI is no longer a problem, since async-profiler has built-in FlameGraph and call tree generator.
  • It also supports JFR format, compatible with JDK Mission Control and other tools.
  • It can profile selected native functions and specified Java methods.
  • It has wall-clock profiling mode.
  • Since version 2.0, async-profiler is able to record multiple events simultaneously.

More improvements are listed on releases page.

I'd say, the main difference is that async-profiler is currently an active project, and I guess, the original question is not relevant anymore.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marshallpierce picture marshallpierce  路  6Comments

franz1981 picture franz1981  路  4Comments

MaXal picture MaXal  路  5Comments

franz1981 picture franz1981  路  8Comments

qqibrow picture qqibrow  路  5Comments