diff options
| author | Namhyung Kim <[email protected]> | 2024-08-16 16:58:37 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-08-19 11:49:22 -0300 |
| commit | c663451f9239c89746b55f1a17ad62b014fa7905 (patch) | |
| tree | 860f113399e54c794415ac4b4c4137bf9e09fe82 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 98d1f1dc72fd6e0e85db4acc0b2dd591f4488216 (diff) | |
perf annotate-data: Add is_better_type() helper
Sometimes more than one variables are located in the same register or a
stack slot. Or it can overwrite existing information with others. I
found this is not helpful in some cases so it needs to update the type
information from the variable only if it's better.
But it's hard to know which one is better, so we needs heuristics. :)
As it deals with memory accesses, the location should have a pointer or
something similar (like array or reference). So if it had an integer
type and a variable is a pointer, we can take the variable's type to
resolve the target of the access.
If it has a pointer type and a variable with the same location has a
different pointer type, it'll take one with bigger target type. This
can be useful when the target type embeds a smaller type (like list
header or RB-tree node) at the beginning so their location is same.
Signed-off-by: Namhyung Kim <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions