diff options
| author | Ruidong Tian <[email protected]> | 2023-12-14 12:33:03 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-12-20 17:31:34 +0000 |
| commit | c344675ad267040b1794b0b5d85147a5023c548d (patch) | |
| tree | 458e0f9c5cec1fcbc3eb4cc13195e5aebaffc16b /tools/perf/scripts/python | |
| parent | perf archive: Add new option '--unpack' to expand tarballs (diff) | |
| download | kernel-c344675ad267040b1794b0b5d85147a5023c548d.tar.gz kernel-c344675ad267040b1794b0b5d85147a5023c548d.zip | |
perf scripts python arm-cs-trace-disasm.py: Set start vm addr of exectable file to 0
For exectable ELF file, which e_type is ET_EXEC, dso start address is a
absolute address other than offset. Just set vm_start to zero when dso
start is 0x400000, which means it is a exectable file.
Reviewed-by: James Clark <[email protected]>
Signed-off-by: Ruidong Tian <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Al Grant <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Mathieu Poirier <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Suzuki Poulouse <[email protected]>
Cc: Tor Jeremiassen <[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')
| -rwxr-xr-x | tools/perf/scripts/python/arm-cs-trace-disasm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py index de58991c78bb..e33aee5c78d7 100755 --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py @@ -258,8 +258,9 @@ def process_event(param_dict): if (options.objdump_name != None): # It doesn't need to decrease virtual memory offset for disassembly - # for kernel dso, so in this case we set vm_start to zero. - if (dso == "[kernel.kallsyms]"): + # for kernel dso and executable file dso, so in this case we set + # vm_start to zero. + if (dso == "[kernel.kallsyms]" or dso_start == 0x400000): dso_vm_start = 0 else: dso_vm_start = int(dso_start) |
