-
Notifications
You must be signed in to change notification settings - Fork 1
fix: optimize read-inline-info #4
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
Conversation
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.
Pull Request Overview
This PR optimizes inline function lookups in Valgrind's debug info system by replacing O(n) linear search with a hash table cache backed by binary search fallback. The implementation uses the Verstable hash table library and adds benchmarking infrastructure using CodSpeed.
- Added hash table-based caching for inline function address lookups
- Integrated Verstable (v2.2.1) hash table library for efficient O(1) lookups
- Implemented hybrid lookup strategy: hash table cache with binary search fallback
- Added CodSpeed benchmarking workflow and test infrastructure
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| coregrind/m_debuginfo/verstable.h | Added Verstable v2.2.1 hash table library for efficient key-value storage |
| coregrind/m_debuginfo/storage.c | Build hash table during inltab canonicalization to cache addr_lo→index mappings |
| coregrind/m_debuginfo/priv_storage.h | Added inltab_lookup field to DebugInfo struct for hash table storage |
| coregrind/m_debuginfo/priv_inltab_lookup.h | Public API for inline table lookup with hash table and binary search |
| coregrind/m_debuginfo/inltab_lookup.c | Implementation of hybrid lookup using hash table cache and binary search fallback |
| coregrind/m_debuginfo/debuginfo.c | Updated VG_(get_inline_fnname) to use new hash table lookup API |
| bench/testdata/take_strings | Git LFS binary test data for benchmarks |
| bench/bench.py | Python benchmark script using pytest-codspeed |
| .github/workflows/codspeed.yml | CodSpeed benchmark CI workflow |
| .github/workflows/ci.yml | Updated CI to skip installing package docs |
| .gitattributes | Git LFS configuration for test data |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
670e716 to
e2da712
Compare
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.
Pull Request Overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cd11b8b to
e79f8d9
Compare
GuillaumeLagrange
left a comment
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.
olgtm, will approve once we have at lesat tested teh impact compared to baseline valgrind.
Comments are pretty minor
5c15079 to
c65ef14
Compare
c65ef14 to
6a89687
Compare
art049
left a comment
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.
Code changes lgtm! Got some feedback on the devX though
|
We also need a few addtional binaries to bench IMO |
fcc25c2 to
5d52ed7
Compare
I've added ls and echo to the test binaries, lmk if you want anyting else as well. I've also modified the bench script a bit to allow passing an arbitrary cmd which will be useful for cmds with args. EDIT: Also added caching and disabled the take-strings benchmark for 3.25 since it takes a super long time. |
0157df9 to
742df7b
Compare
GuillaumeLagrange
left a comment
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, very good work 🤗
e5a5e55 to
c104dbd
Compare
76d83b9 to
6f97311
Compare
09fe459 to
093f525
Compare
6f97311 to
d0504d7
Compare
fce6155 to
e16a7f8
Compare
d0504d7 to
e96b4c1
Compare
e16a7f8 to
f16dd47
Compare
e96b4c1 to
77811f8
Compare
No description provided.