acc9bfb5fa
perf annotate: Improve support for ARM
...
By using arch->init() to set up some regular expressions to associate
ins_ops to ARM instructions, ditching that old table that has
instructions not present on ARM.
Take advantage of having an arch->init() to hide more arm specific stuff
from the common code, like the objdump details.
The regular expressions comes from a patch written by Kim Phillips.
Reviewed-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Chris Riyder <chris.ryder@arm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Kim Phillips <kim.phillips@arm.com >
Cc: Markus Trippelsdorf <markus@trippelsdorf.de >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Russell King <rmk+kernel@arm.linux.org.uk >
Cc: Taeung Song <treeze.taeung@gmail.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-77m7lufz9ajjimkrebtg5ead@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-11-25 10:38:56 -03:00
763d8960a1
perf annotate: Add per arch instructions annotate handlers
...
Another step in supporting cross annotation.
The arch specific tables are put in:
tools/perf/arch/$ARCH/annotation/instructions.c
which, so far, just plug instructions to a bunch of parsers/formatters,
but may have more as the need arises.
This is an alternative implementation to a previous attempt made by Ravi
Bangoria.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Chris Riyder <chris.ryder@arm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Kim Phillips <kim.phillips@arm.com >
Cc: Markus Trippelsdorf <markus@trippelsdorf.de >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com >
Cc: Pawel Moll <pawel.moll@arm.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com >
Cc: Russell King <rmk+kernel@arm.linux.org.uk >
Cc: Taeung Song <treeze.taeung@gmail.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-g3wt282lfa51j4qd0813e3az@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-11-17 17:31:59 -03:00
04b553ad7d
perf coresight: Removing miscellaneous debug output
...
Printing the full path of the selected link is obviously not needed,
hence removing.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1476913323-6836-1-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-10-24 11:07:47 -03:00
3becf4525d
perf tools: Add sink configuration for cs_etm PMU
...
Using the PMU::set_drv_config() callback to enable the CoreSight sink
that will be used for the trace session.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
Acked-by: Jiri Olsa <jolsa@kernel.org >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1474041004-13956-8-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-09-22 13:08:55 -03:00
a818c563ae
perf tools: Add coresight etm PMU record capabilities
...
Coresight ETMs are IP blocks used to perform HW assisted tracing on a
CPU core. This patch introduce the required auxiliary API functions
allowing the perf core to interact with a tracer.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
Acked-by: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1474041004-13956-4-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-09-22 12:19:40 -03:00
7e21b0d579
perf tools: Make coresight PMU listable
...
Adding the required mechanic allowing 'perf list pmu' to discover
coresight ETM/PTM tracers.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org >
Acked-by: Adrian Hunter <adrian.hunter@intel.com >
Acked-by: Jiri Olsa <jolsa@kernel.org >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1474041004-13956-3-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-09-22 12:19:35 -03:00
293d5b4394
perf probe: Support probing on offline cross-arch binary
...
Support probing on offline cross-architecture binary by adding getting
the target machine arch from ELF and choose correct register string for
the machine.
Here is an example:
-----
$ perf probe --vmlinux=./vmlinux-arm --definition 'do_sys_open $params'
p:probe/do_sys_open do_sys_open+0 dfd=%r5:s32 filename=%r1:u32 flags=%r6:s32 mode=%r3:u16
-----
Here, we can get probe/do_sys_open from above and append it to to the target
machine's tracing/kprobe_events file in the tracefs mountput, usually
/sys/kernel/debug/tracing/kprobe_events (or /sys/kernel/tracing/kprobe_events).
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/147214229717.23638.6440579792548044658.stgit@devbox
[ Add definition for EM_AARCH64 to fix the build on at least centos 6, debian 7 & ubuntu 12.04.5 ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-09-01 12:41:09 -03:00
9d8e14d306
perf unwind: Separate local/remote libunwind config
...
CONFIG_LIBUNWIND/NO_LIBUNWIND are changed to CONFIG_LOCAL_LIBUNWIND/
NO_LOCAL_LIBUNWIND for retaining local unwind features. The new
CONFIG_LIBUNWIND stands for either local or remote or both unwind are
supported, and NO_LIBUNWIND means that neither local nor remote unwind
is supported.
LIBUNWIND_LIBS is eliminated in LDFLAGS if local libunwind is not
supported.
Signed-off-by: He Kuang <hekuang@huawei.com >
Acked-by: Jiri Olsa <jolsa@kernel.org >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Kan Liang <kan.liang@intel.com >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Pekka Enberg <penberg@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/1464924803-22214-7-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-06-07 12:08:52 -03:00
e12b202f8f
perf jitdump: Build only on supported archs
...
Build jitdump only on architectures defined in util/genelf.h file, to avoid
breaking the build on such arches.
Signed-off-by: Jiri Olsa <jolsa@kernel.org >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <andi@firstfloor.org >
Cc: Borislav Petkov <bp@suse.de >
Cc: Colin Ian King <colin.king@canonical.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Davidlohr Bueso <dbueso@suse.com >
Cc: He Kuang <hekuang@huawei.com >
Cc: Mel Gorman <mgorman@suse.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/20160310164113.GA11357@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2016-03-10 16:33:19 -03:00
f6ff0e6d7b
perf build: Add arch arm objects building
...
Move the arm arch objects building under build framework to be included
in the libperf build object.
Signed-off-by: Jiri Olsa <jolsa@kernel.org >
Tested-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com >
Tested-by: Will Deacon <will.deacon@arm.com >
Cc: Alexis Berlemont <alexis.berlemont@gmail.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-7bxhmeh4bjabqsmxu4gl6p0b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2015-02-12 13:13:01 -03:00
5e8c0fb6a9
perf build: Add arch x86 objects building
...
Move the x86 arch objects building under build framework to be included
in the libperf build object.
Adding also arch/$(ARCH)/Build files for the rest of the archs. The
reason for this is that in arch/Build we now do:
+libperf-y += $(ARCH)/
which would make the build to fail on other architectures, because the
build framework requires 'Build' file in nested directories and this
patch adds it only for x86.
Signed-off-by: Jiri Olsa <jolsa@kernel.org >
Tested-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com >
Tested-by: Will Deacon <will.deacon@arm.com >
Cc: Alexis Berlemont <alexis.berlemont@gmail.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Link: http://lkml.kernel.org/n/tip-5enob06z07m7ew6nzzdmp3n2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2015-02-12 13:12:01 -03:00
29a3ce31c3
perf tool: fix compilation for ARM
...
This patch fixes ARM compile of the perf tool. The debug.h header file
was missing from a couple of unwind related modules.
Signed-off-by: Stephane Eranian <eranian@google.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Ingo Molnar <mingo@elte.hu >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/20140905042103.GA3091@quad
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2014-09-17 17:08:09 -03:00
97eac381b1
perf tools: Add libdw DWARF post unwind support for ARM
...
Adding libdw DWARF post unwind support, which is part
of elfutils-devel/libdw-dev package from version 0.158.
The new code is contained in unwin-libdw.c object, and
implements unwind__get_entries unwind interface function.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org >
Reviewed-by: Will Deacon <will.deacon@arm.com >
Cc: Arnaldo Carvalho de Melo <acme@kernel.org >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1400229672-16104-4-git-send-email-jean.pihet@linaro.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org >
2014-05-16 11:39:29 +02:00
90fa9deb32
perf tests: Add dwarf unwind test on ARM
...
Adding dwarf unwind test, that setups live machine data over
the perf test thread and does the remote unwind.
Need to use -fno-optimize-sibling-calls for test compilation,
otherwise 'krava_*' function calls are optimized into jumps
and omitted from the stack unwind.
So far it was enabled only for x86.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org >
Reviewed-by: Will Deacon <will.deacon@arm.com >
Cc: Arnaldo Carvalho de Melo <acme@kernel.org >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1400229672-16104-3-git-send-email-jean.pihet@linaro.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org >
2014-05-16 11:39:18 +02:00
3418f9667e
perf tests: Introduce perf_regs_load function on ARM
...
Introducing perf_regs_load function, which is going
to be used for dwarf unwind test in following patches.
It takes single argument as a pointer to the regs dump
buffer and populates it with current registers values.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org >
Reviewed-by: Will Deacon <will.deacon@arm.com >
Cc: Arnaldo Carvalho de Melo <acme@kernel.org >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1400229672-16104-2-git-send-email-jean.pihet@linaro.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org >
2014-05-16 11:39:05 +02:00
21a8b756b8
perf tools: Consolidate types.h for ARM and ARM64
...
Prevents a build breakage since commit d944c4eebc
'tools: Consolidate types.h'
Signed-off-by: Jean Pihet <jean.pihet@linaro.org >
Link: http://lkml.kernel.org/r/1400229672-16104-1-git-send-email-jean.pihet@linaro.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org >
2014-05-16 11:38:57 +02:00
ea3da69df9
perf callchain: Rename unwind__arch_reg_id into libunwind__arch_reg_id
...
Renaming unwind__arch_reg_id into libunwind__arch_reg_id, so it's clear
it's specific to libunwind.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Acked-by: Jean Pihet <jean.pihet@linaro.org >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jean Pihet <jean.pihet@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1389098853-14466-11-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2014-02-18 09:34:48 -03:00
436aa749bb
perf callchain: Separate libunwind code to special object
...
We are going to add libdw library support to do dwarf post unwind.
Making the code ready by moving libunwind dwarf post unwind stuff into
separate object.
Signed-off-by: Jiri Olsa <jolsa@redhat.com >
Acked-by: Jean Pihet <jean.pihet@linaro.org >
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: Ingo Molnar <mingo@kernel.org >
Cc: Jean Pihet <jean.pihet@linaro.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1389098853-14466-10-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2014-02-18 09:34:48 -03:00
7495f3742d
ARM: perf: wire up perf_regs and unwind support for ARM
...
This patch hooks in the perf_regs and libunwind code for ARM.
Cc: Jean Pihet <jean.pihet@linaro.org >
Signed-off-by: Will Deacon <will.deacon@arm.com >
2013-09-30 16:41:55 +01:00
861e10be08
perf tools: Fix build on non-glibc systems due to libio.h absence
...
Including libio.h causes build failures on uClibc systems (which lack
libio.h).
It appears that libio.h was only included to pull in a definition for
NULL, so it has been replaced by stddef.h.
On powerpc, libio.h was conditionally included, but could be removed
completely as it is unneeded. Also, the included of stdlib.h was changed
to stddef.h (as again, only NULL is needed).
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com >
Cc: Ingo Molnar <mingo@redhat.com >
Cc: Paul Mackerras <paulus@samba.org >
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/r/1363300074-26288-1-git-send-email-cody@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2013-03-15 13:05:13 -03:00
0ac8e58f38
ARM: fix perf build with uclibc toolchains
...
libio.h is not provided by uClibc, in order to be able to test the
definition of __UCLIBC__ we need to include stdlib.h, which also
includes stddef.h, providing the definition of 'NULL'.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
Signed-off-by: Will Deacon <will.deacon@arm.com >
2011-08-12 15:40:20 +01:00
eb668c6d06
ARM: 6198/1: perf probe: Add ARM DWARF register number mappings
...
This patch adds mappings from DWARF register numbers to the register
names used by the ARM `Regs and Stack Access API'.
Cc: Jean Pihet <jpihet@mvista.com >
Tested-by: Jamie Iles <jamie.iles@picochip.com >
Signed-off-by: Will Deacon <will.deacon@arm.com >
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk >
2010-07-09 14:41:33 +01:00