perf script python: Move dsoname code to a new function
authorJin Yao <yao.jin@linux.intel.com>
Fri, 1 Jun 2018 09:01:01 +0000 (17:01 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Jun 2018 15:52:09 +0000 (12:52 -0300)
commit5f9e0f3158a5cd0ef7bb205b9f1826b2ec1893a9
tree55eb34bc0a2eb86b0c225a0e4a5e8baead871103
parent2be732c02adb15ed7f2196f075fe63ba6991642c
perf script python: Move dsoname code to a new function

This patch creates a new function get_dsoname() and move the code which
gets the dsoname string to this function.

That's because in next patch, when we process LBR data, we will also
need get_dsoname() to return dsoname for branch from/to.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1527843663-32288-2-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/scripting-engines/trace-event-python.c