Re: [PATCH] tracing: Make tracepoint lockdep check actually test something

From: Steven Rostedt
Date: Fri Mar 10 2023 - 10:52:55 EST


On Fri, 10 Mar 2023 17:27:58 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> This check has been introduced by commit 3a630178fd5f ("tracing: generate RCU
> warnings even when tracepoints are disabled"), and it also added a comment
> above this macro.
>
> * When lockdep is enabled, we make sure to always do the RCU portions of
> * the tracepoint code, regardless of whether tracing is on. However,
> * don't check if the condition is false, due to interaction with idle
> * instrumentation. This lets us find RCU issues triggered with tracepoints
> * even when this tracepoint is off. This code has no purpose other than
> * poking RCU a bit.
>
> I think at least the last sentence will be outdated by this fix.

Ah thanks, I forgot to update that part. What about:

* When lockdep is enabled, we make sure to always test if RCU is
* "watching" regardless if the tracepoint is enabled or not. Tracepoints
* require RCU to be active, and it should always warn at the tracepoint
* site if it is not watching, as it will need to be active when the
* tracepoint is enabled.

?

-- Steve