[PATCH V8 0/4] arm-cs-trace-disasm.py/perf must accommodate non-zero DSO text offset

Namhyung Kim namhyung at kernel.org
Mon Oct 7 22:51:41 PDT 2024


Hello,

Sorry for the long delay.  But can you please explain your problem in
more detail?  Showing ELF program (or section) header would be helpful
as well.

Is the problem when the text mapping has non-zero pgoff only?  Is the
kernel symbols working correctly?  Or is it just the Python script
broken?

Thanks,
Namhyung

On Mon, Sep 09, 2024 at 03:30:02PM -0600, Steve Clevenger wrote:
> Changes in V8:
>   - in arm-cs-trace-disasm.py, ensure map_pgoff is not converted to
>     string.
>   - Remove map_pgoff integer conversion in dso not found print
>     message.
> 
> Changes in V7:
>   - In arm-cs-trace-disasm.py, fix print message core dump resulting
>     from mixed type arithmetic.
>   - Modify CS_ETM_TRACE_ON filter to filter zero start_addr. The
>     CS_ETM_TRACE_ON message is changed to print only in verbose mode.
>   - Removed verbose mode only notification for start_addr/stop_addr
>     outside of dso address range.
> 
> Changes in V6:
>   - In arm-cs-trace-disasm.py, zero map_pgoff for kernel files. Add
>     map_pgoff to start/end address for dso not found message.
>   - Added "Reviewed-by" trailer for patches 1-3 previously reviewed
>     by Leo Yan in V4 and V5.
> 
> Changes in V5:
>   - In symbol-elf.c, branch to exit_close label if open file.
>   - In trace_event_python.c, correct indentation. set_sym_in_dict
>     call parameter "map_pgoff" renamed as "addr_map_pgoff" to
>     match local naming.
> 
> Changes in V4:
>   - In trace-event-python.c, fixed perf-tools-next merge problem.
> 
> Changes in V3:
>   - Rebased to linux-perf-tools branch.
>   - Squash symbol-elf.c and symbol.h into same commit.
>   - In map.c, merge dso__is_pie() call into existing if statement.
>   - In arm-cs-trace-disasm.py, remove debug artifacts.
> 
> Changes in V2:
>   - In dso__is_pie() (symbol-elf.c), Decrease indentation, add null pointer
>     checks per Leo Yan review.
>   - Updated mailing list distribution.
> 
> Steve Clevenger (4):
>   Add dso__is_pie call to identify ELF PIE
>   Force MAPPING_TYPE__IDENTIY for PIE
>   Add map pgoff to python dictionary based on MAPPING_TYPE
>   Adjust objdump start/end range per map pgoff parameter
> 
>  .../scripts/python/arm-cs-trace-disasm.py     | 17 ++++--
>  tools/perf/util/map.c                         |  4 +-
>  .../scripting-engines/trace-event-python.c    | 13 +++-
>  tools/perf/util/symbol-elf.c                  | 61 +++++++++++++++++++
>  tools/perf/util/symbol.h                      |  1 +
>  5 files changed, 86 insertions(+), 10 deletions(-)
> 
> -- 
> 2.44.0
> 



More information about the linux-arm-kernel mailing list