]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf dwarf-aux: Handle array types in die_get_member_type
authorZecheng Li <zli94@ncsu.edu>
Mon, 9 Mar 2026 17:55:18 +0000 (13:55 -0400)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 19 Mar 2026 21:42:29 +0000 (14:42 -0700)
commit6ffc3d0d3db5fb6c88fcb69eb355e9cc839a860c
treedba1a1511fe9386db9e1ba2dd2bde4eef33f5a78
parent69953f9c65856fc9438fc2ad4b9fd8255a2e47da
perf dwarf-aux: Handle array types in die_get_member_type

When a struct member is an array type, die_get_member_type() would stop
iterating since array types weren't handled in the loop. This caused
accesses to array elements within structs to not resolve properly.

Add array type handling by resolving the array to its element type and
calculating the offset within an element using modulo arithmetic

This improves type annotation coverage for struct members that are
arrays.

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