Re: [PATCH v3 11/19] unwind: Add deferred user space unwinding API
Steven Rostedt <[email protected]>
| Newsgroups | org.kernel.vger.linux-toolchains,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 29 Oct 2024 19:20:32 +0100 Peter Zijlstra <[email protected]> wrote: > The 48:16 bit split gives you uniqueness for around 78 hours at 1GHz. Are you saying that there will be one system call per nanosecond? This number is incremented only when a task enters the kernel from user spaces *and* requests a stack trace. If that happens 1000 times a second, that would still be around 9000 years. > > But seriously, perf doesn't need this. It really only needs a sequence > number if you care to stitch over a LOST packet (and I can't say I care > about that case much) -- and doing that right doesn't really take much > at all. Perf may not care because it has a unique descriptor per task, right? Where it can already know what events are associated to a task. But that's just a unique characteristic of perf. The unwinder should give a identifier for every user space stack trace that it will produce and pass that back to the tracer when it requests a stack trace but it cannot yet be performed. This identifier is what we are calling a context cookie. Then when it wants the stack trace, the unwinder will give the tracer the stack trace along with the identifier (context-cookie) that this stack trace was for in the past. It definitely belongs with the undwinder logic. -- Steve