From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f43.google.com (mail-yx1-f43.google.com [74.125.224.43]) (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 F0F263EF65E for ; Thu, 12 Mar 2026 16:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=74.125.224.43 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773331551; cv=pass; b=g05vqMMhB0OenKMv5ip58GcOagaTPSFsma3rZe1DUvOD9IfVkRH5ehvkHF5jlquSHwpGgvurAgmxbsdOX+qMUB9hHEbQSG+7UvvWdnfhWoCTCPwzS17cEVabrjL13VvPZ3ey6ZpjxY7Ofml3qK2Ji/+V6m6jE7T82Fs69AJyALk= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773331551; c=relaxed/simple; bh=uXwIo7R/AWmUX8v9NfNe8o8eyYKkzsQlLFxRYRKmo54=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ITtDgL1p7rbkjnk7rLlZXTrv9sOO5sffWt3zAAqyhpxYE38lQqfOIGjXxL2Ja1Ef0AGb2pmePfqkc9efCpB6GQx5JAwpOMMBGKo0I7cky0EXt6EnYk17FxyoW78YfvKYfw1u6HARCeCnJ6seEhNVmMiJf7Ea5NYGeJe516mFtFU= 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=ZV71t7Yr; arc=pass smtp.client-ip=74.125.224.43 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="ZV71t7Yr" Received: by mail-yx1-f43.google.com with SMTP id 956f58d0204a3-64c9c8f8783so1433657d50.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=KAuisMFN78esc6nZnVH27+bozIG0+7YtvgIIoTm0olmMUqsoAa0cfUzudQsBvHdXc3 y2GZiifmRPiSGEPaPKqOvP2v8JadD/S+2z9G0iqHZPaAuf8rJok51bM9crvClX3KsKpL koZmy5IfzEklyK2jI9qBKyPym69I3q2RnxdonN3R2A7AGnx/obCAMhZOmN+vAD2QK9HL Ycjx5vrMvvNpJUxukg0gyxQy5lkxVIH/UWNcRtY9QaCUqC9Qgv3fz/t4mDW6tkcaPoas cwYyQw29ObOmLbXvk0QcExbVqBdX12RYz8Y+c7i7ePDQBW7RWnfyFIDNJkHieXXodtNg 04aA== 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=RMf5+0nsf/pAvXC/na3taycJ9PhlI5ms4GEsM0lzei0=; b=YTLdfO8rPfMuFlK+ZlpA8QZaGJM9TK2dXavtX7skRhPrtm45Thg58DggzMSjN10Eii z7xLuTwfw104RVircRVkxf4bF9E0JhW9ohabuelV2lVMPTBTOmnnMpuWMJaiRKvTi2UP vi0c9pOpB63U64eXQNYONyFwrjkRKGy0EANKXmiXTIr4DArQx2j2Paz7a/OWWH3uy/80 CPZwfF2tm9RdZQMc2Q9OUItOiFTcio5W6AidN4srjhGFggz4AFOcx4Q5Czc6WTe5TXHq UfR+lJsT+AsB9xKPBUiA4PHINSiiBmTroT2lo845nszONHp9t+K6TfUOHVSAx2B03Sgy yieg==; 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=1773331548; x=1773936348; 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=JmKlkavBf/yAOF4s82cTsdoYBcDg+c1w7g0d5bSER7o=; b=ZV71t7Yr1bKEaCrw5G92Jfwsdtqtd7yVBewYsWTdMu4hlPrngoMiOi9Tg98BUXGj7V J8zfT8WZvuSQVQoHqLeSQshOj58obuQHxEJH3i8/pbu12eU6C7Ce24M/UJLLYQE6Gyj4 MBJKDgq3YAhHELLZd+5LiW+wYl057MgHnzcIvUsegkYPkvlEfdww7dLPjrHlDmsadUdM wSRYkiv5Ntk9U+9jkH4To9xPIEAmJ9iWvbmxM8yMdXibURUG9CU4usIPwIAMNK/zJ+LU w3EzMZjLrprjIUB0o8QsaOC68H8pgsKxw2R93SbRJDixW4oABx/etf2ISufqJ1uZrO5X OKgQ== 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=EVi427T6KQhMn16XdQCV/wrCWsblnYHAr6geG2yic1wqcooKWtM6NBexAwsB4lBb6v 2Z85k2KP3f080bDG5fd6/bSyiM5EsPXcKzLmrKT0mKUchrJN/Zi02OGvx6wxXkcV0Fy6 pClJ3Sthf0SylbWBXbXXPlXfGBEPpYOs6D91D+lSd05IOWx9grvzCL+agQx7td2sIvg+ 2oTkgYAW15S0ffsz/3oMYLuMX3r14j3Y6EYkm00yLHETBC+ViOu7P0MMbJpKrDShdFcy bo7CMHEDI7WPF1/9keGbKmSmFHLznpsVxddTGExkelz4MwN2BZAz+iIcUt2G95XsHCxa GK/w== X-Forwarded-Encrypted: i=1; AJvYcCVeEvYhxPgPHufKfeDWWpN3/TDYlYUZN+o2AV6etNNB6bRJzKgUF004ug7voRoHu4Wl9t8B1bQ8Dw==@vger.kernel.org X-Gm-Message-State: AOJu0Yw4pEDL75DvYaDQ1TAqi1i+ZOeZKOjIq4vzAxP21SqqR1FrlN/4 M3wRUyHDyj6ueQueHmqiljxMzMzbjo8exF4LuLKg5bW2i0MiNT8eaa5Wv9/4sSwiHfk/3dJlVby kYcQ3OkHZcHuSGYHwO29f46OUOiVyZ/S8EuJj6WkUEQ== X-Gm-Gg: ATEYQzz7fVUD473ucWuKp/sF8UIfs9xUjhoHez7JrCagKWMWXHGJyUoarqGpItdY0pP pqTohSi2/lzyBPYrJH8XbywWmB/m3OQPeQsC2a9OhFUWnLGc4F2bqv38JheRYMdKWalHcRkx7Ru 9Qr2GKjrD83rUAEVgJDXG2bs5+GwjHTav+dE4vuh5jYXiA6PF8l0y/mUTgeeF2mcFLVNff0biKV u1duxL+ekg3zTuMqxjBHcnYfqZfGuj2E3CWx6ii51xfIlMsMavJpyqVIAruExoai9XlUEfPPa+k I4JZmNE= 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) 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> <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 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