[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220727094517.25e9dee5@gandalf.local.home>
Date: Wed, 27 Jul 2022 09:45:17 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Beau Belgrave <beaub@...ux.microsoft.com>
Cc: mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
linux-trace-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org
Subject: Re: [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@...ux.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
Powered by blists - more mailing lists