-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
std.debug.scanAllFunctions is too slow; stack traces are too slow for large binaries #2458
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
Comments
Related to #907. I don't believe the dwarf parsing used a buffered in stream either last I checked. An strace may be interesting. |
Here is a partial strace of a compiler assertion error for reference. Cancelled before it finished since it was taking forever. I would definitely start with adding buffered reads and then see how the repeated seeks can be reduced. Maybe as suggested there is extra dwarf information for navigating functions.
|
I have no doubt buffered reads would be a significant speed up and it's definitely worth doing. However I believe there is also a Big-O complexity issue here as well |
In large binaries, such a the zig compiler itself, scanning the entire list of functions in all of the debug info is doing too much work, and it makes stack traces take so long that it's worth it to ctrl+C the process and use a debugger. Instead the functions should be found lazily, and I believe there is additional DWARF information available to help binary search or otherwise quickly narrow in on the function that a given address is in.
The text was updated successfully, but these errors were encountered: