mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 19:11:31 +00:00
90fa9deb32
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>
60 lines
1.1 KiB
C
60 lines
1.1 KiB
C
#ifndef ARCH_PERF_REGS_H
|
|
#define ARCH_PERF_REGS_H
|
|
|
|
#include <stdlib.h>
|
|
#include <linux/types.h>
|
|
#include <asm/perf_regs.h>
|
|
|
|
void perf_regs_load(u64 *regs);
|
|
|
|
#define PERF_REGS_MASK ((1ULL << PERF_REG_ARM_MAX) - 1)
|
|
#define PERF_REGS_MAX PERF_REG_ARM_MAX
|
|
#define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32
|
|
|
|
#define PERF_REG_IP PERF_REG_ARM_PC
|
|
#define PERF_REG_SP PERF_REG_ARM_SP
|
|
|
|
static inline const char *perf_reg_name(int id)
|
|
{
|
|
switch (id) {
|
|
case PERF_REG_ARM_R0:
|
|
return "r0";
|
|
case PERF_REG_ARM_R1:
|
|
return "r1";
|
|
case PERF_REG_ARM_R2:
|
|
return "r2";
|
|
case PERF_REG_ARM_R3:
|
|
return "r3";
|
|
case PERF_REG_ARM_R4:
|
|
return "r4";
|
|
case PERF_REG_ARM_R5:
|
|
return "r5";
|
|
case PERF_REG_ARM_R6:
|
|
return "r6";
|
|
case PERF_REG_ARM_R7:
|
|
return "r7";
|
|
case PERF_REG_ARM_R8:
|
|
return "r8";
|
|
case PERF_REG_ARM_R9:
|
|
return "r9";
|
|
case PERF_REG_ARM_R10:
|
|
return "r10";
|
|
case PERF_REG_ARM_FP:
|
|
return "fp";
|
|
case PERF_REG_ARM_IP:
|
|
return "ip";
|
|
case PERF_REG_ARM_SP:
|
|
return "sp";
|
|
case PERF_REG_ARM_LR:
|
|
return "lr";
|
|
case PERF_REG_ARM_PC:
|
|
return "pc";
|
|
default:
|
|
return NULL;
|
|
}
|
|
|
|
return NULL;
|
|
}
|
|
|
|
#endif /* ARCH_PERF_REGS_H */
|