]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf dwarf-aux: Collect all variable locations for insn tracking
authorZecheng Li <zli94@ncsu.edu>
Mon, 9 Mar 2026 17:55:24 +0000 (13:55 -0400)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 19 Mar 2026 21:42:30 +0000 (14:42 -0700)
commita90407a5a89a29f3c4af89e55afe4d0489b8a81c
tree347dfd62a65772d2fe6a15628d58af2444db8a3a
parent4fb7eefe6c539840fa8854d67d00af35331b8843
perf dwarf-aux: Collect all variable locations for insn tracking

Previously, only the first DWARF location entry was collected for each
variable. This was based on the assumption that instruction tracking
could reconstruct the remaining state. However, variables may have
different locations across different address ranges, and relying solely
on instruction tracking can miss valid type information.

Change __die_collect_vars_cb() to iterate over all location entries
using dwarf_getlocations() in a loop. This ensures that variables with
multiple location ranges are properly tracked, improving type coverage.

Signed-off-by: Zecheng Li <zli94@ncsu.edu>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/dwarf-aux.c