Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Compare performance to llvm-symbolizer #183

Open
danielocfb opened this issue May 23, 2023 · 5 comments
Open

Compare performance to llvm-symbolizer #183

danielocfb opened this issue May 23, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@danielocfb
Copy link
Collaborator

We should capture some numbers on how blazesym compares to llvm-symbolizer in terms of performance (symbolization time + memory usage).

@danielocfb
Copy link
Collaborator Author

The problem here may be that llvm-symbolizer is a binary that we exec and so we have process spawn overhead. Perhaps there is a lower level LLVM library we could use that we just link to. Anyway, just for the record, here is a sample invocation similar to what we do in our benchmarks:

$ llvm-symbolizer --no-inlines --no-demangle --obj=data/vmlinux-5.17.12-100.fc34.x86_64 0xffffffff8110ecb0
> abort_creds
> /usr/src/debug/kernel-5.17.12/linux-5.17.12-100.fc34.x86_64/kernel/cred.c:534:1

@anakryiko
Copy link
Member

llvm-symbolizer can be launched in interactive mode, where you'll pass addresses after the process starts. I don't know if llvm-symbolizer will do any pre-processing before accepting input, though. We could time llvm-symbolizer start up separately (start interactively with no input args and send ctrl-D) and subtract that from actual llvm-symbolizer invocation

@danielocfb
Copy link
Collaborator Author

Makes sense and would certainly be better. I'd still be a tad cautious that we are comparing apples to apples though, because we'd still have waiting-for and parsing of input in the mix as well. Don't know how much that perturbs numbers.

@danielocfb danielocfb added the help wanted Extra attention is needed label Jun 5, 2023
@danielocfb
Copy link
Collaborator Author

FWIW, this seems to be how addr2line benchmarks various tools: https://github.com/gimli-rs/addr2line/blob/dda39c4106ef82aa33c4f6538019789cd88bc69c/benchmark.sh

@d-e-s-o
Copy link
Collaborator

d-e-s-o commented Jul 20, 2023

FWIW, as of 2684cfa we compare performance to addr2line and we are in the same ballpark. I already pointed to its benchmarks above, but their claim is that:

The library aims to perform similarly to equivalent existing tools such
as addr2line from binutils, eu-addr2line from elfutils, and
llvm-symbolize from the llvm project, and in the past some benchmarking
was done that indicates a comparable performance.

So transitively speaking we are good on this front. Wouldn't hurt to compare directly, though, so I will keep this issue open for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants