-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add option to print virtual address to trace.py #1555
Conversation
Could you add or modify an existing example in trace_example.txt? This way, maybe more people will see it and use it. Could you also change the man page at |
Thanks for looking! Updated the man page and added an example to trace_example.txt - there was no example showing -K/-U either, so I tried to choose something reasonable. If you have some better ideas let me know. |
The use case we have for this option is to tail the outputted virtual addresses, resolve them and log through a different pipeline. Do you feel it's reasonable to have this option lead to only output virtual addresses instead of in addition to string symbols? The reason is that BCC's default symbol resolution behavior is quite expensive (look for debuginfo first, does CRC calculation for debuginfo). Doing those on large binaries such as HHVM that we use for web server often take couple of seconds with a lot of CPU and memory. Do you feel that only outputting virtual addresses is a useful behavior for the tool in general, that we could add this option for? |
[buildbot, ok to test] |
virtual address output is also useful when: Regarding whether this option |
From bcc's perspective I think addr+sym makes more sense. For our use case, printing only addresses would be better, but we'd probably need another flag for that and I don't want to overcomplicate this code. (Then we could take this even further and add "-F ip,sym,dso" as in perf...) We use this only for ad-hoc debugging and profiling, so I don't think it's a big issue. Or maybe I just haven't run into this being a problem yet :) |
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.
We'd like to be able to symbolize stacks with external symbolizers like addr2line or llvm-symbolizer to get more information including inlined functions or line numbers. This is adding a simple option to print the virtual address.
Happy to add this as an option to bpf.sym() if that's preferred