Re: [PATCH v4 28/39] unwind_user/deferred: Add deferred unwinding interface
Josh Poimboeuf <[email protected]>
| Newsgroups | org.kernel.vger.linux-toolchains,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-trace-kernel |
|---|---|
| Message-ID | <20250122213809.wcpmpvexg3gmzsoq@jpoimboe> |
On Wed, Jan 22, 2025 at 02:37:30PM +0100, Peter Zijlstra wrote:
> On Tue, Jan 21, 2025 at 06:31:20PM -0800, Josh Poimboeuf wrote:
> > +/*
> > + * The context cookie is a unique identifier which allows post-processing to
> > + * correlate kernel trace(s) with user unwinds. The high 12 bits are the CPU
>
> s/12/16/ ?
Oops. Code is right, comment is wrong.
>
> > + * id; the lower 48 bits are a per-CPU entry counter.
> > + */
> > +static u64 ctx_to_cookie(u64 cpu, u64 ctx)
> > +{
> > + BUILD_BUG_ON(NR_CPUS > 65535);
> > + return (ctx & ((1UL << 48) - 1)) | (cpu << 48);
> > +}
--
Josh