From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f47.google.com (mail-yx1-f47.google.com [74.125.224.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BF7D3CCFB4 for ; Thu, 12 Mar 2026 15:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=74.125.224.47 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773329961; cv=pass; b=AySNqVShCq+BRdqzUX7WbtEWH+ZDsHiYatQ9t666MSMryyi2mIEQ9h0Pug0iOTT2hek24q9QV1O0leCvHuW/40p32c1S0CfDL0QzRmQQXDgpq0sGnF/vDloxtPSx8ak2CkOyacVHUJV1pK309nx/I9Ow56YXU/ZHhxLdP5ID2r0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773329961; c=relaxed/simple; bh=4tNFTOMSBZ1/Qp5RW7o3J5ezE7GBWsXKNJ/prrgOmk0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=oGXssz+S0EM/nbr52H6Rr4B5lpOitvjOFPBOeCfkmJi19vBZbfy9rPSjRlxt41IkI03o4nzzS4Pfx86bDA7HK1zU31WSDGcyGJji3j87RTmUAQL/GpfHDu/laEf1wLJkmkLnNUa2fiR+CzgNMWo5LJX3v0619qbdVzjxBV/WTe0= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bitbyteword.org; spf=pass smtp.mailfrom=bitbyteword.org; dkim=pass (2048-bit key) header.d=bitbyteword.org header.i=@bitbyteword.org header.b=e3vaIiIY; arc=pass smtp.client-ip=74.125.224.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bitbyteword.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bitbyteword.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bitbyteword.org header.i=@bitbyteword.org header.b="e3vaIiIY" Received: by mail-yx1-f47.google.com with SMTP id 956f58d0204a3-64ca4dfdd88so1351825d50.0 for ; Thu, 12 Mar 2026 08:39:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773329958; cv=none; d=google.com; s=arc-20240605; b=R/qSfFFSTCAQNqeIjGWjHSFpdDnnqhU173Unz3SQB7K/WEUcTLHZ3aRRic1TUYkzMK e6jViO363d33le6MCUHB3+tWptdv/riy7R99Z+Ix9PXaU79ogsXPeg8xIXQjJ43JVFzS agCb8f6CrjddeCm7+bZZBA1s5sHUF7TJ7TxXe9G6GLtpVJpFuKmy8iQREDKaNiSrU537 omq6D1IEPogYjlt2E8Az7eI/KAV4+WhNRsdEzzOmRbPJp0CN3a8Z/mNEGmdzTrP3q45u bKuxGYWwmGOXQIIZtPjUC4vIFSa+uUQy9vO+GOhWx5Fn1RuAX+vqBIuu7Yua9yB9LeM4 uLMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xV1lSatIeQOkkUeHEjEALGO2gUG7BopBUXrJE33ZDos=; fh=q2vDivHatkaqvltEln+ewKYdo7RRsVELlQjkj2Uls9I=; b=gIVLv/iu8dsAz4rS7Xk7dKYYIlr0d3YX5MnpN2StS0cXSzINzjPyCg3xmr1XaGOA1J yznKn7d9bvzszbqkUoaaF0obu3QrT2daLlhtz3+2b4D/O4XQSjnSrTsnmNbd5SyjnJMQ JybViCrcKpKbIoElcSjkdstiu45mMvY239FEY9hLPl3nQTU8L9wQOysEzs+mLYbsqm6r vo7ZV/pMTyqWs1mG4qTLMisBDel3hgEcRkoUa1rEoi85DuNsUF2b1WE/3Vy8n9Vqjd+6 QUhJUotMop5rqaoO6EhvC9JhMaB/bG54pfJmLLMRABNPT1EG2OG9bwAd6YSpNn3QVUD1 d/dg==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitbyteword.org; s=google; t=1773329958; x=1773934758; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xV1lSatIeQOkkUeHEjEALGO2gUG7BopBUXrJE33ZDos=; b=e3vaIiIYGWUOtCfN3v0i0XwlQU8iKw5tKJiDxrs5BpZgUFpI7tsKG3ZooWaPnqOdPC Z8SAY5DTLTvpjaOB6s9bQ3ZxX+LcGGgsdf6NZnIPHM+cPfYf7mdvQUxOUB0MAZatRAPX OPlQ6GS038tCrg8KJ4MGW9OOzjznHa++hyHmoFietr8QqWOe5FW8fUSSVZIetM87CB5M jIZEMQ7uYMS4Ig4PCqqRV43UmxiY9EVL0EW92WOQZ4YI2E2FPpEUlNbyASWYFFksXS3t 9mACIIHPFuYoU4rBir3aqJDHbJg+APFP1wB7a8eG0Ml1cARiYuzc0pJgDxzADpeGYDNg MfFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773329958; x=1773934758; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xV1lSatIeQOkkUeHEjEALGO2gUG7BopBUXrJE33ZDos=; b=Z3/Qm3swjAJiKZbtVOO+8nhM67Kb0EAxuaUrfFBPsHjZWgLNpLsAFpZne/J82aSiUh jGs9x/tEbhBUWtcNk/BuNHT/g3+MtvtuCyLl6CC3wpLQDloQJvz0iWYDfcRgdk9wGsNy 92Jqi9iXLler5t/jRzzb5LDLSIqiVruR1GCGoqJuNevYnUrqEA67STQ6e5indedtVBOT 5SJWz7cjBqHTiyAOS4y1kFlYyXA0GiPJ4EKqTM0QO7id7ilCLht0Ty+ZVIz8SiSZZYwA oizYi540rGTCn90U5/kb9m7MxB1/E6WQBYZxwj2sK1F9hBh118yMyrK1sNMmIdfVapds +Vbg== X-Forwarded-Encrypted: i=1; AJvYcCUtHNcQMVchkx5M5UL6Yy+ipQcc1gO2Dg75MGnViyevNORP/kA6wOzQWzXIuYVzijlr4PCuAZC7Ww==@vger.kernel.org X-Gm-Message-State: AOJu0YyRCKm0Jbj9yJi6oESdMT9b/IOeihw4/9GLmYFv1NJW7tnIoPb7 gQNSJZzVyNRaVfXGPXgjUDkhXm+WCZcG/XRZ522lLE+PN1YlyrA3sBUTUuja0cRD1iSfPEkksjT i1BajBoRbD9sy0BCJ47GiffeKpgxXPDHyM9BJXOV/Fg== X-Gm-Gg: ATEYQzy58Da0wfVAfua0lZJWAPTLLEglEdj2TQHQMufj0h0jsPb3f5elrRmeYUooA+j 5EqIgOIWRlC8YWk+ttcmhhtvbxCdU1ffGqLjWCAmC7sQ8b7eweytIdoDYlxc/cTNff8F9sBolk1 b/Gy+ysJR/NloIr/oUWHy2qPMqzEZLrdR2r1VmD2AwErE2JTu7/pV/FINoXEaWN7i/sCktQwAJH IOvefRa40VDVEzWrogd6vKLWwGc6QIaDbQlpdqNS9FsCAFbK4f/Mkz12WcDqWU2PoFm3bHfYP3j 9ABBn50LtgkBLgDgug== X-Received: by 2002:a53:bb8d:0:b0:64d:5742:5ab0 with SMTP id 956f58d0204a3-64d6577eb37mr4463263d50.43.1773329958142; Thu, 12 Mar 2026 08:39:18 -0700 (PDT) Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260312150523.2054552-1-vineeth@bitbyteword.org> <20260312150523.2054552-2-vineeth@bitbyteword.org> <20260312111255.7925b4e2@gandalf.local.home> In-Reply-To: <20260312111255.7925b4e2@gandalf.local.home> From: Vineeth Remanan Pillai Date: Thu, 12 Mar 2026 11:39:06 -0400 X-Gm-Features: AaiRm53MQsKCFNMcydaZ5MLANW9ImopAkQThe-DUzJ0WQT8Ah4MCG48E4vTQfog Message-ID: Subject: Re: [PATCH 01/15] tracepoint: Add trace_invoke_##name() API To: Steven Rostedt Cc: Peter Zijlstra , Dmitry Ilvokhin , Masami Hiramatsu , Mathieu Desnoyers , Ingo Molnar , Jens Axboe , io-uring@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Marcelo Ricardo Leitner , Xin Long , Jon Maloy , Aaron Conole , Eelco Chaudron , Ilya Maximets , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-sctp@vger.kernel.org, tipc-discussion@lists.sourceforge.net, dev@openvswitch.org, Oded Gabbay , Koby Elbaz , dri-devel@lists.freedesktop.org, "Rafael J. Wysocki" , Viresh Kumar , "Gautham R. Shenoy" , Huang Rui , Mario Limonciello , Len Brown , Srinivas Pandruvada , linux-pm@vger.kernel.org, MyungJoo Ham , Kyungmin Park , Chanwoo Choi , =?UTF-8?Q?Christian_K=C3=B6nig?= , Sumit Semwal , linaro-mm-sig@lists.linaro.org, Eddie James , Andrew Jeffery , Joel Stanley , linux-fsi@lists.ozlabs.org, David Airlie , Simona Vetter , Alex Deucher , Danilo Krummrich , Matthew Brost , Philipp Stanner , Harry Wentland , Leo Li , amd-gfx@lists.freedesktop.org, Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, Wolfram Sang , linux-i2c@vger.kernel.org, Mark Brown , Michael Hennerich , =?UTF-8?B?TnVubyBTw6E=?= , linux-spi@vger.kernel.org, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, Chris Mason , David Sterba , linux-btrfs@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 12, 2026 at 11:13=E2=80=AFAM Steven Rostedt wrote: > > On Thu, 12 Mar 2026 11:04:56 -0400 > "Vineeth Pillai (Google)" wrote: > > > Add trace_invoke_##name() as a companion to trace_##name(). When a > > caller already guards a tracepoint with an explicit enabled check: > > > > if (trace_foo_enabled() && cond) > > trace_foo(args); > > > > trace_foo() internally repeats the static_branch_unlikely() test, which > > the compiler cannot fold since static branches are patched binary > > instructions. This results in two static-branch evaluations for every > > guarded call site. > > > > trace_invoke_##name() calls __do_trace_##name() directly, skipping the > > redundant static-branch re-check. This avoids leaking the internal > > __do_trace_##name() symbol into call sites while still eliminating the > > double evaluation: > > > > if (trace_foo_enabled() && cond) > > trace_invoke_foo(args); /* calls __do_trace_foo() directly */ > > > > Three locations are updated: > > - __DECLARE_TRACE: invoke form omits static_branch_unlikely, retains > > the LOCKDEP RCU-watching assertion. > > - __DECLARE_TRACE_SYSCALL: same, plus retains might_fault(). > > - !TRACEPOINTS_ENABLED stub: empty no-op so callers compile cleanly > > when tracepoints are compiled out. > > > > Suggested-by: Steven Rostedt > > Suggested-by: Peter Zijlstra > > Signed-off-by: Vineeth Pillai (Google) > > Assisted-by: Claude:claude-sonnet-4-6 > > I'm guessing Claude helped with the other patches. Did it really help wit= h this one? > Claude wrote and build tested the whole series based on my guidance and prompt :-). I verified the series before sending it out, but claude did the initial work. Thanks, Vineeth