aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2018-10-17 00:15:45 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-10-18 10:16:38 -0400
commitd87b9790b3deb7601872d34fd05af3da78147583 (patch)
treedde22559afa59e0e3b979335b11a11709b29bfef
parent0ab41886648bb75b951bd41d8b5cecaca8e0ad66 (diff)
perf jitdump: Add Sparc support.
Signed-off-by: David S. Miller <davem@davemloft.net> Link: http://lkml.kernel.org/r/20181016.211545.1487970139012324624.davem@davemloft.net Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/arch/sparc/Makefile2
-rw-r--r--tools/perf/util/genelf.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/arch/sparc/Makefile b/tools/perf/arch/sparc/Makefile
index 7fbca175099e..275dea7ff59a 100644
--- a/tools/perf/arch/sparc/Makefile
+++ b/tools/perf/arch/sparc/Makefile
@@ -1,3 +1,5 @@
1ifndef NO_DWARF 1ifndef NO_DWARF
2PERF_HAVE_DWARF_REGS := 1 2PERF_HAVE_DWARF_REGS := 1
3endif 3endif
4
5PERF_HAVE_JITDUMP := 1
diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h
index de322d51c7fe..b72440bf9a79 100644
--- a/tools/perf/util/genelf.h
+++ b/tools/perf/util/genelf.h
@@ -29,6 +29,12 @@ int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_debug_ent
29#elif defined(__powerpc__) 29#elif defined(__powerpc__)
30#define GEN_ELF_ARCH EM_PPC 30#define GEN_ELF_ARCH EM_PPC
31#define GEN_ELF_CLASS ELFCLASS32 31#define GEN_ELF_CLASS ELFCLASS32
32#elif defined(__sparc__) && defined(__arch64__)
33#define GEN_ELF_ARCH EM_SPARCV9
34#define GEN_ELF_CLASS ELFCLASS64
35#elif defined(__sparc__)
36#define GEN_ELF_ARCH EM_SPARC
37#define GEN_ELF_CLASS ELFCLASS32
32#else 38#else
33#error "unsupported architecture" 39#error "unsupported architecture"
34#endif 40#endif