]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf dwarf-aux: Skip check_variable for variable lookup
authorZecheng Li <zecheng@google.com>
Mon, 9 Mar 2026 17:55:16 +0000 (13:55 -0400)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 19 Mar 2026 21:42:29 +0000 (14:42 -0700)
commit8b8d8b8f17dfa817e4e94ce4e8f26d92f6f65504
tree05fb3be1579dd538db05ade2893df4d94d0b2528
parentace16303179efad4e1a2aebb27a661e5d1e7277d
perf dwarf-aux: Skip check_variable for variable lookup

Both die_find_variable_by_reg and die_find_variable_by_addr call
match_var_offset which already performs sufficient checking and type
matching. The additional check_variable call is redundant, and its
need_pointer logic is only a heuristic. Since DWARF encodes accurate
type information, which match_var_offset verifies, skipping
check_variable improves both coverage and accuracy.

Return the matched type from die_find_variable_by_reg and
die_find_variable_by_addr via the existing `type` field in
find_var_data, removing the need for check_variable in
find_data_type_die.

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