lkml.org 
[lkml]   [2022]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/7] tracing/user_events: Use bits vs bytes for enabled status page data
On Tue, 26 Jul 2022 19:01:47 -0700
Beau Belgrave <beaub@linux.microsoft.com> wrote:

> Ah, I see the confusion. Sorry.
>
> EVENT_STATUS_* are internal bits that aren't used with STATUS_MASK or
> STATUS_BYTE. It's only used to set and check the user event status byte
> for checking if anything is attached and outputting which probe is
> connected within the kernel side.
>
> STATUS_BYTE and STATUS_MASK take a bit in a bitmap and figure out which
> byte in the status mapping should be used and which bit in that byte
> should be set/reset (mask) when it's enabled/disabled via a probe. Both
> the user and kernel need to align on this logic.
>
> IE: Bits above the lower 3 of the index/bit of the event to enable is the byte
> and the lower 3 bits (& 7) is the actual bit to set.
>
> For example if the user_event with the index 1024 is enabled, we need to
> figure out which byte and bit represents that event when a probe is
> attached.
>
> I got into detail of this in the documentation for both a byte and long
> wise checking of these values.
>
> Hope that helps explain it.

Yes, but that should be in the comments above the code.

-- Steve

\
 
 \ /
  Last update: 2022-07-27 15:46    [W:1.417 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site