Re: [PATCH v2 00/11] unwind, perf: sframe user space unwinding, deferred perf callchains
From: Namhyung Kim
Date: Tue Sep 17 2024 - 17:59:22 EST
Hello,
On Mon, Sep 16, 2024 at 06:46:45PM -0400, Steven Rostedt wrote:
> On Mon, 16 Sep 2024 20:15:45 +0200
> Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> > On Mon, Sep 16, 2024 at 05:39:53PM +0200, Josh Poimboeuf wrote:
> >
> > > The cookie is incremented once per entry from userspace, when needed.
> > >
> > > It's a unique id used by the tracers which is emitted with both kernel
> > > and user stacktrace samples so the userspace tool can stitch them back
> > > together. Even if you have multiple tracers triggering at the same time
> > > they can all share a single user trace.
> >
> > But perf don't need this at all, right? It knows that the next deferred
> > trace for that tid will be the one.
Well.. technically you can sample without tid. But I'm not sure how
much it'd be useful if you collect callchains without tid.
>
> Is that because perf uses per task buffers? Will perf know this if it
> uses a global buffer? What does perf do with "-a"?
Then it'd use per-cpu ring buffers. But each sample would have pid/tid
pair and time so perf tools can match it with a deferred callchian.
Thanks,
Namhyung