[PATCH dwarves 0/3] Check DW_OP_[GNU_]entry_value for possible parameter matching

Yonghong Song
2024-11-08T18:05:23Z

Currently, pahole relies on dwarf to find whether a particular func
has its parameter mismatched with standard or optimized away.
In both these cases, the func will not be put in BTF and this
will prevent fentry/fexit tracing for these functions.

The current parameter checking focuses on the first location/expression
to match intended parameter register. But in some cases, the first
location/expression does not have expected matching information,
but further location like DW_OP_[GNU_]entry_value can provide
information which matches the expected parameter register.
Patch #3 provides details how this will work.
Patches #1 and #2 have some preparation work done for patch #3.

Yonghong Song (3):
dwarf_loader: Refactor function parameter__new()
dwarf_loader: Refactor function check_dwarf_locations()
dwarf_loader: Check DW_OP_[GNU_]entry_value for possible parameter
matching

dwarf_loader.c | 134 +++++++++++++++++++++++++++++++++++++------------
1 file changed, 102 insertions(+), 32 deletions(-)

--
2.43.5