]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Always store regs->ip in perf_callchain_kernel()
authorSong Liu <songliubraving@fb.com>
Thu, 27 Jun 2019 00:33:52 +0000 (19:33 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 27 Jun 2019 22:11:20 +0000 (00:11 +0200)
commit351818060ae9bc89f9e0da02b4fe4ba571f73236
tree97dbd7bf501484ccf72a747381e1b32c1c31e172
parent4edab38e26d2a62d1b4dab76d63dc78e3cdc1630
perf/x86: Always store regs->ip in perf_callchain_kernel()

The stacktrace_map_raw_tp BPF selftest is failing because the RIP saved by
perf_arch_fetch_caller_regs() isn't getting saved by perf_callchain_kernel().

This was broken by the following commit:

  b264a22ba87b ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER")

With that change, when starting with non-HW regs, the unwinder starts
with the current stack frame and unwinds until it passes up the frame
which called perf_arch_fetch_caller_regs().  So regs->ip needs to be
saved deliberately.

Fixes: b264a22ba87b ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER")
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Kairui Song <kasong@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/3975a298fa52b506fea32666d8ff6a13467eee6d.1561595111.git.jpoimboe@redhat.com
arch/x86/events/core.c