Skip to content

Commit

Permalink
perf tools: Add support for the xtensa architecture
Browse files Browse the repository at this point in the history
Tested using kernel tracepoints on a QEMU simulated environment.

Kernel support for perf depends on the patch "xtensa: enable
HAVE_PERF_EVENTS", which is scheduled for v3.14.

Hardware performance counters are not supported under xtensa yet.

Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-xtensa@linux-xtensa.org
Link: http://lkml.kernel.org/r/aafcdb22f04e2d3188d2938528939481be56b649.1389608855.git.baruch@tkos.co.il
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Baruch Siach authored and Arnaldo Carvalho de Melo committed Jan 20, 2014
1 parent 8bac41c commit 3a46817
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/perf/perf.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@
#define CPUINFO_PROC "CPU"
#endif

#ifdef __xtensa__
#define mb() asm volatile("memw" ::: "memory")
#define wmb() asm volatile("memw" ::: "memory")
#define rmb() asm volatile("" ::: "memory")
#define CPUINFO_PROC "core ID"
#endif

#define barrier() asm volatile ("" ::: "memory")

#ifndef cpu_relax
Expand Down

0 comments on commit 3a46817

Please sign in to comment.