Skip to content

Very long analysis due to slow addr2line calls #294

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Mingun opened this issue Oct 31, 2023 · 5 comments
Closed

Very long analysis due to slow addr2line calls #294

Mingun opened this issue Oct 31, 2023 · 5 comments

Comments

@Mingun
Copy link

Mingun commented Oct 31, 2023

I try to use flamegraph to profile quick-xml benchmarks. I've run the following command in the quick-xml checkout:

cargo flamegraph --bench macrobenches -- --bench

perf collected over 8GB of raw data and analysis going more than a hour already. flamegraph runs perf script which runs addr2line many times, about 2-3 invocations per second. It seems to me that such a simple task consumes absurd time to complete. Probably it is better to find more performant solutions to process perf data.

@djc
Copy link
Contributor

djc commented Oct 31, 2023

Maybe have a look at #74 and #199? I think there was an issue with some versions of the addr2line script. You may also want to try samply as a flamegraph alternative.

@Mingun
Copy link
Author

Mingun commented Nov 1, 2023

Ah, ok, yes, this indeed a duplicate of those issues -- I'm on Ubuntu 22.04 with kernel 5.15 where perf performance is not fixed yet.

@Mingun Mingun closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
@RalfJung
Copy link

RalfJung commented Nov 24, 2024

I am on binutils 2.43 and kernel 6.11 (current Debian testing), and I am still hitting this -- it's now already been around 10 minutes since perf finished (the actual program run took 3s and gathered 3k samples, which should be a trivial amount of data), and it's still spawning thousands and thousands of addr2line processes. Is there some new problem here?

@RalfJung
Copy link

Interesting, when I finally killed perf script I saw this error on the terminal printed a few hundred times:

addr2line /home/r/.debug/.build-id/37/8f73d84f9d89f55dfc18a9ab84bce321cd9b09/elf: could not read first record

No idea if that could have something to do with the performance problem.

@RalfJung
Copy link

Turns out using gimli's addr2line fixes this. Magic.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants