diff options
| author | Zecheng Li <zli94@ncsu.edu> | 2026-03-09 13:55:20 -0400 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-03-19 14:42:29 -0700 |
| commit | 1b8db0c963bf788392976bea87f0ef8d227c4930 (patch) | |
| tree | 02ace00eb5bdfa2901ada338a11e1cffe40b87b6 /tools/perf/scripts/python/task-analyzer.py | |
| parent | 752e662ae0619721ddde6f60a84fbe3c669fc539 (diff) | |
perf annotate-data: Handle global variable access with const register
When a register holds a constant value (TSR_KIND_CONST) and is used with
a negative offset, treat it as a potential global variable access
instead of falling through to CFA (frame) handling.
This fixes cases like array indexing with computed offsets:
movzbl -0x7d72725a(%rax), %eax # array[%rax]
Where %rax contains a computed index and the negative offset points to a
global array. Previously this fell through to the CFA path which doesn't
handle global variables, resulting in "no type information".
The fix redirects such accesses to check_kernel which calls
get_global_var_type() to resolve the type from the global variable
cache. This is only done for kernel DSOs since the pattern relies on
kernel-specific global variable resolution. We could also treat
registers with integer types to the global variable path, but this
requires more changes.
Signed-off-by: Zecheng Li <zli94@ncsu.edu>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
