LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2] perf/x86: always include regs->ip in callchain
@ 2019-05-23 5:34 Song Liu
2019-05-23 6:06 ` Kairui Song
0 siblings, 1 reply; 2+ messages in thread
From: Song Liu @ 2019-05-23 5:34 UTC (permalink / raw)
To: linux-kernel, bpf; +Cc: kernel-team, Song Liu, Kairui Song, Peter Zijlstra
Commit d15d356887e7 removes regs->ip for !perf_hw_regs(regs) case. This
patch adds regs->ip back.
Fixes: d15d356887e7 ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER")
Cc: Kairui Song <kasong@redhat.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Song Liu <songliubraving@fb.com>
---
arch/x86/events/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index f315425d8468..7b8a9eb4d5fd 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -2402,9 +2402,9 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
return;
}
+ if (perf_callchain_store(entry, regs->ip))
+ return;
if (perf_hw_regs(regs)) {
- if (perf_callchain_store(entry, regs->ip))
- return;
unwind_start(&state, current, regs, NULL);
} else {
unwind_start(&state, current, NULL, (void *)regs->sp);
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] perf/x86: always include regs->ip in callchain
2019-05-23 5:34 [PATCH v2] perf/x86: always include regs->ip in callchain Song Liu
@ 2019-05-23 6:06 ` Kairui Song
0 siblings, 0 replies; 2+ messages in thread
From: Kairui Song @ 2019-05-23 6:06 UTC (permalink / raw)
To: Song Liu; +Cc: Linux Kernel Mailing List, bpf, Kernel Team, Peter Zijlstra
On Thu, May 23, 2019 at 1:34 PM Song Liu <songliubraving@fb.com> wrote:
>
> Commit d15d356887e7 removes regs->ip for !perf_hw_regs(regs) case. This
> patch adds regs->ip back.
>
> Fixes: d15d356887e7 ("perf/x86: Make perf callchains work without CONFIG_FRAME_POINTER")
> Cc: Kairui Song <kasong@redhat.com>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Signed-off-by: Song Liu <songliubraving@fb.com>
> ---
> arch/x86/events/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
> index f315425d8468..7b8a9eb4d5fd 100644
> --- a/arch/x86/events/core.c
> +++ b/arch/x86/events/core.c
> @@ -2402,9 +2402,9 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx *entry, struct pt_regs *re
> return;
> }
>
> + if (perf_callchain_store(entry, regs->ip))
> + return;
> if (perf_hw_regs(regs)) {
> - if (perf_callchain_store(entry, regs->ip))
> - return;
> unwind_start(&state, current, regs, NULL);
> } else {
> unwind_start(&state, current, NULL, (void *)regs->sp);
> --
> 2.17.1
>
Hi, this will make !perf_hw_regs(regs) case print a double first level
stack trace, which is wrong. And the actual problem that unwinder give
empty calltrace in bpf is still not fixed.
--
Best Regards,
Kairui Song
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-23 6:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 5:34 [PATCH v2] perf/x86: always include regs->ip in callchain Song Liu
2019-05-23 6:06 ` Kairui Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).