Commit e90c7d0
committed
refactor(debuginfo): use find_rx_mapping for fallback DI lookup
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).1 parent fe0dbfc commit e90c7d0
1 file changed
Lines changed: 21 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2621 | 2621 | | |
2622 | 2622 | | |
2623 | 2623 | | |
2624 | | - | |
2625 | | - | |
2626 | | - | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
2627 | 2628 | | |
2628 | | - | |
2629 | | - | |
2630 | | - | |
2631 | | - | |
2632 | | - | |
2633 | | - | |
2634 | | - | |
2635 | | - | |
2636 | | - | |
2637 | | - | |
2638 | | - | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
2639 | 2646 | | |
2640 | 2647 | | |
2641 | 2648 | | |
| |||
0 commit comments