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

Add timing to debug-sym-file.py #109

Merged
merged 1 commit into from
Dec 8, 2023
Merged

Add timing to debug-sym-file.py #109

merged 1 commit into from
Dec 8, 2023

Conversation

willkg
Copy link
Contributor

@willkg willkg commented Dec 7, 2023

Along with debugging sym file structure, this gives us some information about how long it took symbolic to parse it.

Generally, I only use this script for debugging dump_syms and symbolic problems. Adding timing to it and changing it to use eliot.libsymbolic parse function gives it some additional future utility around speeding up symbols file parsing.

To use, download a symbols file and then:

$ make shell
app@0b29887b3279:/app$ ./bin/debug-sym-file.py libxul.so.sym 
libxul.so.sym
size: 699,495,515
first line: ['MODULE', 'Linux', 'x86', '015C5165CC511800A25E59423F0D5CB40', 'libxul.so']
parsing sym file with symbolic ... 10.472s
app@0b29887b3279:/app$ 

Along with debugging sym file structure, this gives us some information
about how long it took symbolic to parse it.
Copy link
Contributor

@smarnach smarnach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Also looks like either my system is slower than yours, or Windows symbols files are slower to parse:

$ bin/debug-sym-file.py xul.pdb/26D7EB25B4D3AB484C4C44205044422E1/xul.sym 
xul.pdb/26D7EB25B4D3AB484C4C44205044422E1/xul.sym
size: 643,048,158
first line: ['MODULE', 'windows', 'x86_64', '26D7EB25B4D3AB484C4C44205044422E1', 'xul.pdb']
parsing sym file with symbolic ... 22.208s

@willkg
Copy link
Contributor Author

willkg commented Dec 8, 2023

app@70abba933371:/app$ ./bin/debug-sym-file.py xul.sym 
xul.sym
size: 643,048,158
first line: ['MODULE', 'windows', 'x86_64', '26D7EB25B4D3AB484C4C44205044422E1', 'xul.pdb']
parsing sym file with symbolic ... 13.553s
app@70abba933371:/app$ 

I did my last laptop refresh a little under a year ago, I think. When was your last one?

@willkg willkg merged commit a4c31a1 into main Dec 8, 2023
1 check passed
@willkg
Copy link
Contributor Author

willkg commented Dec 8, 2023

Thank you!

@willkg willkg deleted the sym-debug-timing branch January 11, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants