feat: improve segment check logic#10
Merged
not-matthias merged 3 commits intoMay 20, 2026
Merged
Conversation
Member
not-matthias
commented
May 20, 2026
- refactor(debuginfo): use find_rx_mapping for fallback DI lookup
- test(callgrind): smoke-test VG_(find_DebugInfo) attribution
Merging this PR will degrade performance by 12.3%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
GuillaumeLagrange
approved these changes
May 20, 2026
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
lgtm, we'll be able to release this soon IMO
The fallback added in 938e424 used VG_(am_find_nsegment) + VG_(am_get_filename) + strcmp against each DI's fsm.filename. Replace it with ML_(find_rx_mapping)(di, a, a), which walks the same set of rx mappings already recorded for each DebugInfo and keeps a per-DI single-entry cache (last_rx_map), so the hot path is O(1). No coverage change for BOLT-style binaries: both R-E PT_LOADs are recorded as rx DebugInfoMappings during ELF acceptance, so the loop finds them just as well as the filename match did. Also emit a Vg_DebugMsg trace when the fallback fires (only with -v -v).
Add a tiny C program with hot_fn in .text plus warm_fn/cold_fn in orphan executable sections (warm_code/cold_code) that sit in the same R-E LOAD but outside text_avma..text_avma+text_size. The .vgtest compares the resolved ob= basenames against an expected list, verifying callgrind attributes events to the test binary even when execution leaves .text.
Drop the explicit CODSPEED_PERF_ENABLED=false override so the CodSpeed action runs with its default perf integration.
48f7a21 to
465be51
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.