Re: [PATCH v3] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 3:39 PM Josh Poimboeuf wrote: > > On Tue, Jul 02, 2024 at 09:02:03PM -0700, Andrii Nakryiko wrote: > > @@ -2833,6 +2858,18 @@ perf_callchain_user32(struct pt_regs *regs, struct > > perf_callchain_entry_ctx *ent > > > > fp = compat_ptr(ss_base + regs->bp); > > pa

Re: [PATCH v3] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Josh Poimboeuf
On Tue, Jul 02, 2024 at 09:02:03PM -0700, Andrii Nakryiko wrote: > @@ -2833,6 +2858,18 @@ perf_callchain_user32(struct pt_regs *regs, struct > perf_callchain_entry_ctx *ent > > fp = compat_ptr(ss_base + regs->bp); > pagefault_disable(); > + > +#ifdef CONFIG_UPROBES > + /* see per

[PATCH v3] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-02 Thread Andrii Nakryiko
When tracing user functions with uprobe functionality, it's common to install the probe (e.g., a BPF program) at the first instruction of the function. This is often going to be `push %rbp` instruction in function preamble, which means that within that function frame pointer hasn't been established