aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-08-31 15:06:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-08-31 15:06:28 -0700
commit7c01919130ef8b27306ed1faf1f2cc079621923c (patch)
tree0917d34a7a7b90bb025e3ddca670f2cc403e4965 /tools
parent7b8067d37058ec01889513e16033fb6de72a98ce (diff)
parent650c919798c71fb34b77a6f2ba03a06907f06a76 (diff)
Merge tag 'xtensa-20150830' of git://github.com/czankel/xtensa-linux
Pull xtensa updates from Chris Zankel: "Xtensa fixes and improvements for 4.3: - reimplement DMA API using common helpers - implement counting and sampling perf events using hardware perf counters - add fake NMI support for hardware perf counters - fix THREADPTR register reloading on return to userspace - keep exception/interrupt stack continuous for debugger - improve vmlinux.lds.S post-processing" * tag 'xtensa-20150830' of git://github.com/czankel/xtensa-linux: xtensa: improve vmlinux.lds.S sed post-processing xtensa: drop unused irq_err_count xtensa: implement fake NMI xtensa: don't touch EXC_TABLE_FIXUP in _switch_to xtensa: fix kernel register spilling xtensa: reorganize irq flags tracing perf tools: xtensa: add DWARF register names xtensa: implement counting and sampling perf events xtensa: count software page fault perf events xtensa: add profiling IRQ type to xtensa_irq_map xtensa: select PERF_USE_VMALLOC for cache-aliasing configurations xtensa: move oprofile stack tracing to stacktrace.c xtensa: keep exception/interrupt stack continuous xtensa: clean up Kconfig dependencies for custom cores xtensa: reimplement DMA API using common helpers xtensa: fix threadptr reload on return to userspace xtensa: ISS: add missing va_end into split_if_spec
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/arch/xtensa/Build1
-rw-r--r--tools/perf/arch/xtensa/Makefile3
-rw-r--r--tools/perf/arch/xtensa/util/Build1
-rw-r--r--tools/perf/arch/xtensa/util/dwarf-regs.c25
4 files changed, 30 insertions, 0 deletions
diff --git a/tools/perf/arch/xtensa/Build b/tools/perf/arch/xtensa/Build
new file mode 100644
index 000000000000..54afe4a467e7
--- /dev/null
+++ b/tools/perf/arch/xtensa/Build
@@ -0,0 +1 @@
+libperf-y += util/
diff --git a/tools/perf/arch/xtensa/Makefile b/tools/perf/arch/xtensa/Makefile
new file mode 100644
index 000000000000..7fbca175099e
--- /dev/null
+++ b/tools/perf/arch/xtensa/Makefile
@@ -0,0 +1,3 @@
+ifndef NO_DWARF
+PERF_HAVE_DWARF_REGS := 1
+endif
diff --git a/tools/perf/arch/xtensa/util/Build b/tools/perf/arch/xtensa/util/Build
new file mode 100644
index 000000000000..954e287bbb89
--- /dev/null
+++ b/tools/perf/arch/xtensa/util/Build
@@ -0,0 +1 @@
+libperf-$(CONFIG_DWARF) += dwarf-regs.o
diff --git a/tools/perf/arch/xtensa/util/dwarf-regs.c b/tools/perf/arch/xtensa/util/dwarf-regs.c
new file mode 100644
index 000000000000..4dba76bfb4ce
--- /dev/null
+++ b/tools/perf/arch/xtensa/util/dwarf-regs.c
@@ -0,0 +1,25 @@
+/*
+ * Mapping of DWARF debug register numbers into register names.
+ *
+ * Copyright (c) 2015 Cadence Design Systems Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <stddef.h>
+#include <dwarf-regs.h>
+
+#define XTENSA_MAX_REGS 16
+
+const char *xtensa_regs_table[XTENSA_MAX_REGS] = {
+ "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
+ "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15",
+};
+
+const char *get_arch_regstr(unsigned int n)
+{
+ return n < XTENSA_MAX_REGS ? xtensa_regs_table[n] : NULL;
+}