With this patch it is possible to handle library files that don't end with ".so". Something like ".so.0.1" is now supported and will add the proper entry in the mmaps dictionary.
(Modification to the regular expression was suggested by Tor Jeremiassen)
Signed-off-by: Mathieu Poirier mathieu.poirier@linaro.org --- tools/perf/scripts/python/cs-trace-disasm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/scripts/python/cs-trace-disasm.py b/tools/perf/scripts/python/cs-trace-disasm.py index 75f67d314a42..54700b859f7f 100644 --- a/tools/perf/scripts/python/cs-trace-disasm.py +++ b/tools/perf/scripts/python/cs-trace-disasm.py @@ -67,7 +67,7 @@ def trace_begin(): else: del build_ids['[kernel.kallsyms]']
- mmap_re = re.compile("PERF_RECORD_MMAP2 -?[0-9]+/[0-9]+: [(0x[0-9a-fA-F]+).*:\s.*\s(.*.so)") + mmap_re = re.compile("PERF_RECORD_MMAP2 -?[0-9]+/[0-9]+: [(0x[0-9a-fA-F]+).*:\s.*\s(\S*)") cmd_output= check_output("perf script --show-mmap-events | fgrep PERF_RECORD_MMAP2",shell=True).split('\n') for line in cmd_output: m = mmap_re.search(line)