-
Notifications
You must be signed in to change notification settings - Fork 20
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
Allow use of llvm-addr2line as the command #18
Conversation
Prior to this change the addr2line.py script always uses addr2line as the binary to decode stack frames. This change allows the path and/or name of the binary to be provided explicitly on the command line. This allows the of llvm-addr2line, an alternative implementation based on llvm-symbolizer, which in my experiments is over *200* times as fast as addr2line in decoding some redpanda stack traces. See https://sourceware.org/bugzilla/show_bug.cgi?id=29010 for more on the addr2line slowness. This change also slightly changes the 'dummy line' strategy used to detect when addr2line has finished outputting frames for the current address to make it compatible with llvm-addr2line. Fixes scylladb#1035.
r"(.*0x0000000000000000: \?\? \?\?:0\n)" # addr2line pattern | ||
r"|" | ||
r"(.*0x0: \?\? at \?\?:0\n)" # llvm-addr2line pattern | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main complication is the slightly differnet "end of backtrace" beahvior for llvm-addr2line: the 0x0 frame we use to find it looks a bit different. Use a regex to accommodate the differences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
after this merges then the next step is to update the sha1 in vtool's 3rdparty.cmake so that this will get pulled down into everyone's tree?
Hello Seastar cousins, thanks for discovering the issue and feel free to post a pull request upstream as well :) Pull requests are also accepted in scylladb/seastar, so no need for a separate mailing list patch. |
:) That's wonderful news @psarna |
Yes! I'll do that next. |
@jcsp everything look good here to you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Prior to this change the addr2line.py script always uses addr2line as the
binary to decode stack frames. This change allows the path and/or name
of the binary to be provided explicitly on the command line.
This allows the of llvm-addr2line, an alternative implementation
based on llvm-symbolizer, which in my experiments is over 200 times as
fast as addr2line in decoding some redpanda stack traces.
See https://sourceware.org/bugzilla/show_bug.cgi?id=29010 for more
on the addr2line slowness.
This change also slightly changes the 'dummy line' strategy used to
detect when addr2line has finished outputting frames for the current
address to make it compatible with llvm-addr2line.
Fixes scylladb#1035.