Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/perf: add perf register support for floating-point registers

For correct unwinding of user space processes, the floating-point
register contents are required. For example, leaf functions might
use fp registers to temporarily store the return address.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Reviewed-and-tested-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Hendrik Brueckner and committed by
Martin Schwidefsky
de9954b7 0da0017f

+51 -1
+32
tools/perf/arch/s390/include/perf_regs.h
··· 49 49 return "R14"; 50 50 case PERF_REG_S390_R15: 51 51 return "R15"; 52 + case PERF_REG_S390_FP0: 53 + return "FP0"; 54 + case PERF_REG_S390_FP1: 55 + return "FP1"; 56 + case PERF_REG_S390_FP2: 57 + return "FP2"; 58 + case PERF_REG_S390_FP3: 59 + return "FP3"; 60 + case PERF_REG_S390_FP4: 61 + return "FP4"; 62 + case PERF_REG_S390_FP5: 63 + return "FP5"; 64 + case PERF_REG_S390_FP6: 65 + return "FP6"; 66 + case PERF_REG_S390_FP7: 67 + return "FP7"; 68 + case PERF_REG_S390_FP8: 69 + return "FP8"; 70 + case PERF_REG_S390_FP9: 71 + return "FP9"; 72 + case PERF_REG_S390_FP10: 73 + return "FP10"; 74 + case PERF_REG_S390_FP11: 75 + return "FP11"; 76 + case PERF_REG_S390_FP12: 77 + return "FP12"; 78 + case PERF_REG_S390_FP13: 79 + return "FP13"; 80 + case PERF_REG_S390_FP14: 81 + return "FP14"; 82 + case PERF_REG_S390_FP15: 83 + return "FP15"; 52 84 case PERF_REG_S390_MASK: 53 85 return "MASK"; 54 86 case PERF_REG_S390_PC:
+19 -1
tools/perf/arch/s390/util/unwind-libdw.c
··· 37 37 dwarf_regs[13] = REG(R13); 38 38 dwarf_regs[14] = REG(R14); 39 39 dwarf_regs[15] = REG(R15); 40 + 41 + dwarf_regs[16] = REG(FP0); 42 + dwarf_regs[17] = REG(FP2); 43 + dwarf_regs[18] = REG(FP4); 44 + dwarf_regs[19] = REG(FP6); 45 + dwarf_regs[20] = REG(FP1); 46 + dwarf_regs[21] = REG(FP3); 47 + dwarf_regs[22] = REG(FP5); 48 + dwarf_regs[23] = REG(FP7); 49 + dwarf_regs[24] = REG(FP8); 50 + dwarf_regs[25] = REG(FP10); 51 + dwarf_regs[26] = REG(FP12); 52 + dwarf_regs[27] = REG(FP14); 53 + dwarf_regs[28] = REG(FP9); 54 + dwarf_regs[29] = REG(FP11); 55 + dwarf_regs[30] = REG(FP13); 56 + dwarf_regs[31] = REG(FP15); 57 + 40 58 dwarf_regs[64] = REG(MASK); 41 59 dwarf_regs[65] = REG(PC); 42 60 43 61 dwfl_thread_state_register_pc(thread, dwarf_regs[65]); 44 - return dwfl_thread_state_registers(thread, 0, 16, dwarf_regs); 62 + return dwfl_thread_state_registers(thread, 0, 32, dwarf_regs); 45 63 }