]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf annotate: Save pointer offset in stack state
authorZecheng Li <zecheng@google.com>
Mon, 13 Oct 2025 18:16:01 +0000 (18:16 +0000)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 21 Oct 2025 13:02:49 +0000 (06:02 -0700)
commit109218718de2f7173fabdd507cc6786e79ad1690
tree231e059e420dfea754ad5c098764c19099597e66
parent1f4cc4ae3f8ae661bae3722e973a0f5be650fcbf
perf annotate: Save pointer offset in stack state

The tracked pointer offset was not being preserved in the stack state,
which could lead to incorrect type analysis. This change adds a
ptr_offset field to the type_state_stack struct and passes it to
set_stack_state and findnew_stack_state to ensure the offset is
preserved after the pointer is loaded from a stack location. It improves
the type annotation coverage and quality.

Signed-off-by: Zecheng Li <zecheng@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/arch/x86/annotate/instructions.c
tools/perf/util/annotate-data.c
tools/perf/util/annotate-data.h