From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F95C106ACD0 for ; Thu, 12 Mar 2026 16:48:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0FF2210EA71; Thu, 12 Mar 2026 16:48:12 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=bitbyteword.org header.i=@bitbyteword.org header.b="iESGdEhB"; dkim-atps=neutral Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id EBD8F10EA5B for ; Thu, 12 Mar 2026 16:05:48 +0000 (UTC) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-7986d231b3cso35688927b3.1 for ; Thu, 12 Mar 2026 09:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773331548; cv=none; d=google.com; s=arc-20240605; b=JODtTuWkFRLnRVGlyO0NT3ZrgvBZp6Y7bExH3HJyQhDrCXApaAY/pWv4KHchMyBIqK i1YhYw1/ISe7EneWFCMWkFMnqPSpfhLCU0YGIiaWfHUgTfDNhobCUDaa1Ip8R50pAQh8 GDAGK3aIE0Vo5fxvAnZhH9h3IJbdnrYeTFJZzUlUhY2TJlitGUBAE059cbvGwiF7Um2N LiP5tvS3aupi3MMpYkuunk1HukG4Fyzqt4yA/Rp22MszE72JAfIg9+AAuF5hxC+W2m0/ ePdd3w6J9M1UlQc4CfSKkjmS5kfL+Z1nRMmowTrAKk3BjXndt4EQxQ9eKR10wl9n5dAH aCxA== 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=JmKlkavBf/yAOF4s82cTsdoYBcDg+c1w7g0d5bSER7o=; fh=osCh+gAuBDfyX69X6bW+w2FKnM/fmzxBYRPORG0p8oU=; b=DtCOR8cwRfuaRoCIB3FI0MqL9DPdkCrAX5gQmH1YaEa2nSiaipMt/GUu0qiuBEv6OU Ij7e5KtUGYaA6Quhc/D/KyN5rI7wJnBx1dPHrJxU5xszE8a7y+/iSwJHsm6TH7BUIFAr 02KH0V8lg7L2FEf8fiVV52s0a2WRXKjGtJFAGrRKefFzp5Kbns5+RVqTTVdUH4APAc17 8zQV3NPfZX+/KKCniG0fADReb2xVmktkd2sGSiGrNCWZjPZ3JwZMSopOx9DpNWCnajDH 7TAexNVqOmgSMcEqvBioVdQZ8mqRdafutVD1usbgvH9RwAZK1AtXzlYsiS5j8Tbr/p0h URGA==; darn=lists.freedesktop.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=1773331548; x=1773936348; darn=lists.freedesktop.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=JmKlkavBf/yAOF4s82cTsdoYBcDg+c1w7g0d5bSER7o=; b=iESGdEhBFZg/W/YjekYdA4vH14/+v6TXLCQWyZpSiCNXePW6noDvHVAmfFj7xzcC8l EUmQz90WdDx1Lg++KuWYwPVaUhhJ68UR0afySOcCTWup5ELxhkbS3ytwiqo6fj9cYpaA E+taQeJxfy/xQiJXvvl3oSCvOen3JGTjachCg0SQ/YspViLk9FqfkYX6b/oIuUnyXfL4 cw8zRFFBUOyUfmtikzxh9cqrmhLtEkgmDYjwIX/ZhPqGJN0M5jfaO3j4nlq1vb0fYQQS C+vqXmJV+TWyX48o/cDx3guk+kzvrTcgxUP5UdUknZM+J/Sc6u6SamGwCMRfcyF3nUXF acBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773331548; x=1773936348; 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=JmKlkavBf/yAOF4s82cTsdoYBcDg+c1w7g0d5bSER7o=; b=CBRK2TFR2Sk7ALUDHAho4Xd12/EkAoniS77RxFhhAinT85EgKBf9dbm7UkXEr3UDFq O9IQ/Enfkqp6aC1pNANK4TXZyyTeQgSZZ6rDrKwDoTR3hTRkIlf22mISQDb166Reb1c5 nzjCUAxRDoVbfBbDBJXPLW9bq5bYplWccItsXJLBbHA/iM99Qu046fMuOfRkoRr2skcN EYeGujuFlICmhb36saDodej4++zxtxmea+3PuXxZL+peJV4B8MjCldDhTqvm3sTrXiCB 3lQTaXXlVWjRsiCly6WYxsmv7L17MUEvEw+U7nC+3w/vg7BPE/xS6q/42KTiUOxn19lV K/sA== X-Forwarded-Encrypted: i=1; AJvYcCWJE6JpI0Nun/buy4SJjKUjm6IswqpuAwjzOHt+9h+uC4M910jrsyYf66OB054vysMuc6Jsfymh5n8=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzoPvU8eufJpFmMXQipEKzGXlR5+4OV7c9+ctuED7uz9SalDDcf yVeTDe4QHEpNa8y6tN/OaC6o4Nmq1RUQcN2fwgB1kEBTXrg0MBgw2DWgPyRXXALaIuj6h/08fJd kdMx9uBlFiHOlHD5G1GN1NRPMDwujiydnAzRtOJlnBA== X-Gm-Gg: ATEYQzynlXPOAkhtXe1PVaBPpV9b8S7NsGwH5RF6gYuJ2jWryhplIYknX2ax4lPFJac 1tGD5X0VWvHL4OjwjAUGs3nqgzVuDvXrtJdns9UPqBgJCG1yEmTrOO5NmnVZzzebQ2hGLl/b5iI PuB3uYRJRsJn7ICVyqXntW2V50nGSocGv2332jJoI2W7BmzZrUSxO43j54IEwAzyPatea3n1ZkF A9dR17IiCWiebe9fzHmFnrYNjBYGjk1sNuIKzJYaE+AYCT7WQnk2nAP48v6EKpNIIaPtMaF2LaA ix4ruXc= X-Received: by 2002:a53:df06:0:b0:646:9ddf:5f2 with SMTP id 956f58d0204a3-64e62869514mr137952d50.31.1773331547890; Thu, 12 Mar 2026 09:05:47 -0700 (PDT) MIME-Version: 1.0 References: <20260312150523.2054552-1-vineeth@bitbyteword.org> <20260312150523.2054552-2-vineeth@bitbyteword.org> <20260312111255.7925b4e2@gandalf.local.home> <20260312155326.GB1282955@noisy.programming.kicks-ass.net> In-Reply-To: <20260312155326.GB1282955@noisy.programming.kicks-ass.net> From: Vineeth Remanan Pillai Date: Thu, 12 Mar 2026 12:05:37 -0400 X-Gm-Features: AaiRm52SVVT4jiV0FzOGXISct6FMh2E9oWpuKL1FA2qkv7l8yLE2a6rVIE8wyUY Message-ID: Subject: Re: [PATCH 01/15] tracepoint: Add trace_invoke_##name() API To: Peter Zijlstra Cc: Steven Rostedt , 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 X-Mailman-Approved-At: Thu, 12 Mar 2026 16:48:06 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Mar 12, 2026 at 11:53=E2=80=AFAM Peter Zijlstra wrote: > > On Thu, Mar 12, 2026 at 11:39:06AM -0400, Vineeth Remanan Pillai wrote: > > 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, w= hich > > > > the compiler cannot fold since static branches are patched binary > > > > instructions. This results in two static-branch evaluations for ev= ery > > > > 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, retain= s > > > > 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= with 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. > > That seems like an unreasonable waste of energy. You could've had claude > write a Coccinelle script for you and saved a ton of tokens. Yeah true, Steve also mentioned this to me offline. Haven't used Coccinelle before, but now I know :-) Thanks, Vineeth