From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: tracepoint: Add trace_call__##name() API
Date: Wed, 25 Mar 2026 07:48:30 +1000 [thread overview]
Message-ID: <review-patch1-20260323160052.17528-2-vineeth@bitbyteword.org> (raw)
In-Reply-To: <20260323160052.17528-2-vineeth@bitbyteword.org>
Patch Review
**LOCKDEP assertion missing from `trace_call__##name()`**
In `__DECLARE_TRACE`, the existing `trace_##name()` includes a LOCKDEP RCU-watching assertion:
```c
if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) {
WARN_ONCE(!rcu_is_watching(),
"RCU not watching for tracepoint");
}
```
The new `trace_call__##name()` in this patch omits it entirely:
```c
static inline void trace_call__##name(proto)
{
__do_trace_##name(args);
}
```
The cover letter claims "preserving all other correctness properties of the normal path (RCU-watching assertion...)" but the implementation does not actually do this. While one could argue the assertion already fired from the preceding `trace_foo_enabled()` call (which does *not* check RCU watching — it only checks the static branch key), the LOCKDEP check in `trace_##name()` runs unconditionally regardless of the static branch, specifically to catch RCU misuse even in testing where the tracepoint may not be enabled. Dropping it from `trace_call__##name()` changes debug-build behavior.
The same concern applies to `__DECLARE_TRACE_SYSCALL`, though there `might_fault()` *is* preserved, which is good.
Consider adding the LOCKDEP check to both `trace_call__` variants, or explicitly documenting in the commit message that it is intentionally omitted and why.
**Commit message inconsistency**: The commit message says:
```
trace_invoke_foo(args); /* calls __do_trace_foo() directly */
```
This still uses the old `trace_invoke_` naming from v1, but the actual API is `trace_call__`. This should be updated to match.
**Code looks correct otherwise**: The three insertion points (regular, syscall, stub) are the right places, and the stub correctly compiles to an empty function.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-24 21:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 16:00 [PATCH v2 00/19] tracepoint: Avoid double static_branch evaluation at guarded call sites Vineeth Pillai (Google)
2026-03-23 16:00 ` [PATCH v2 01/19] tracepoint: Add trace_call__##name() API Vineeth Pillai (Google)
2026-03-24 21:48 ` Claude Code Review Bot [this message]
2026-03-23 16:00 ` [PATCH v2 05/19] accel/habanalabs: Use trace_call__##name() at guarded tracepoint call sites Vineeth Pillai (Google)
2026-03-24 21:48 ` Claude review: " Claude Code Review Bot
2026-03-23 16:00 ` [PATCH v2 08/19] dma-buf: " Vineeth Pillai (Google)
2026-03-24 21:48 ` Claude review: " Claude Code Review Bot
2026-03-23 16:00 ` [PATCH v2 10/19] drm: " Vineeth Pillai (Google)
2026-03-24 21:48 ` Claude review: " Claude Code Review Bot
2026-03-24 14:28 ` [PATCH v2 00/19] tracepoint: Avoid double static_branch evaluation at guarded " Steven Rostedt
2026-03-24 21:48 ` Claude review: " Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-20260323160052.17528-2-vineeth@bitbyteword.org \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox