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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E25DC77B7D for ; Sun, 14 May 2023 03:02:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229506AbjENDCn (ORCPT ); Sat, 13 May 2023 23:02:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjENDCm (ORCPT ); Sat, 13 May 2023 23:02:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 370A81BD8; Sat, 13 May 2023 20:02:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA00460B38; Sun, 14 May 2023 03:02:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B317C433D2; Sun, 14 May 2023 03:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684033360; bh=mJ7FROF21hftwJgCmZhoKpXoDuToifD8eM33mGLt0mQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=prQ4Wm9AAnZCqvzAN1GjX1iBSQn2GOEr1SLXvSKe9p0dqi0+vgKKeojIyijzqwBXM nEFNUGuJHEvUGJl8v3186cvW6GqYvbUdioSpLPX5nNCmPOk1957meNjwQQBu5U47To zw0EpK+E3hf16xPGKAobx/HB7fUUqCaSoyPOgCs52QHRuL+HpWZTR6lMBG4JMiakSy 9ypg6FN2zZsEHp7nH6ESpULUWvu/ou4Yqwxcc/1r16c2upH0WV2FGxWsuHpkrzxGJ4 QVSwNYhvodTHW42w1qQ89L9XdcVMZhKFaiLRsQlBTVqxND9Csuf6ctEk1OwyELPJeg KuHMZIwBB2hIg== Date: Sun, 14 May 2023 12:02:36 +0900 From: Masami Hiramatsu (Google) To: Steven Rostedt Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, Florent Revest , Mark Rutland , Will Deacon , Mathieu Desnoyers , Martin KaFai Lau , bpf@vger.kernel.org Subject: Re: [PATCH v9.1 07/11] tracing/probes: Add $$args meta argument for all function args Message-Id: <20230514120236.25fd2bcb174da8ff95ba89c1@kernel.org> In-Reply-To: <20230505174856.04ca1e6a@gandalf.local.home> References: <168299383880.3242086.7182498102007986127.stgit@mhiramat.roam.corp.google.com> <168299390127.3242086.2714570777321787734.stgit@mhiramat.roam.corp.google.com> <20230505174856.04ca1e6a@gandalf.local.home> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-trace-kernel@vger.kernel.org On Fri, 5 May 2023 17:48:56 -0400 Steven Rostedt wrote: > On Tue, 2 May 2023 11:18:21 +0900 > "Masami Hiramatsu (Google)" wrote: > > > From: Masami Hiramatsu (Google) > > > > Add the '$$args' meta fetch argument for function-entry probe events. This > > Hmm, couldn't we just use $args ? That would be different from $arg1, > $arg2, etc. > > The $$ to me would be either the bash pid of current, or perhaps it would > be just to use a dollar sign. I don't see the precedence of $$args being a > "full expand". OK, I just thought it required a bit special prefix because it will be expanded to several arguments (it is different from other $-params) and, internally, it should be handled in the different path from the other $-params. But the latter is internal reason, we should not care about that. (of course I will leave a comment it.) Thank you! > > -- Steve > > > > will be expanded to the all arguments of the function and the tracepoint > > using BTF function argument information. > > > > e.g. > > # echo 'p vfs_read $$args' >> dynamic_events > > # echo 'f vfs_write $$args' >> dynamic_events > > # echo 't sched_overutilized_tp $$args' >> dynamic_events > > # cat dynamic_events > > p:kprobes/p_vfs_read_0 vfs_read file=file buf=buf count=count pos=pos > > f:fprobes/vfs_write__entry vfs_write file=file buf=buf count=count pos=pos > > t:tracepoints/sched_overutilized_tp sched_overutilized_tp rd=rd overutilized=overutilized > > > > Signed-off-by: Masami Hiramatsu (Google) > > --- -- Masami Hiramatsu (Google)