Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp459014rdb; Tue, 23 Jan 2024 05:09:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYyHj6dnKoyNzbjtev4lvNiCH+gs3uOChz5vLQuIk0GZCgU1dlPsMStTabZjOZtaTPCaLh X-Received: by 2002:a05:6214:c2b:b0:685:6166:3472 with SMTP id a11-20020a0562140c2b00b0068561663472mr903849qvd.117.1706015369562; Tue, 23 Jan 2024 05:09:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706015369; cv=pass; d=google.com; s=arc-20160816; b=KvEDs7o5Uhp7ePnyBwpFE61gHIR1Wc0KstdKg4KwCdcWepvXlDg1HAQGwyVWzVMmUl iuoHbzpzgLPTF93HULh0BV7rvf/JW+pRe2fy2iNAplbWECOMTXPq7/t/YbqNq6a7yjFQ Bc94RJ/iBTwnpaaXEOXv5/gTuEXE5/ycuiSi13s8O+2WZp0rhDX8psMOjXkoQKkJHxMH UroQww435yDyhCq/Z23mMETHEs5YLRP2OXUM/bsctDkX1aALQR8/iyhXhhOwiCA1BBzh NMPpAJedwvCGKDpNw2SIVDJlARBN+uI5kscSA0+HafzfXBVUcBkMMysBNGBjJxQFFaDZ o+mA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=/20pHwHAJXnim7f2gILCnovWwTfi9eVB0nUEvFnCM+4=; fh=Cg71qZKzR4YfOJF8hZF4uwq7cJbJuaEt0vZOj81Q828=; b=jmT7YHQhCiiLXYXKVtdAw7TuqvKGmgcMa1lD/05z7LfPrKPTZuDqx6qKXavF9/ypAV SflCdGDElwfuJzfnZRthnc+2vquUpa/oDnxPWvDyT9Y+uR9p1bP6NatyV5gy2l/SM7Zd y9P+qyPoLXKNU9Ufvgz8wlFd7b4de51Ni9zFJVXDalIQ0fs2fDZ1cQ/k3gNP6w9eJQLR N43XT/fG4Yzj3wA5mZmtxTY713lScsSm43KCatdZvxua897pi26JkinkjxCVg1NNZH5c jmBJagdkJoL2DWRNKCCXMZnV+q2Cbe89Xbf8Hgu9+oXX7bd/fWWXaWTmP7tJsODZ1Oqq f1MQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ojTbrOL5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35314-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b18-20020a0cc992000000b006840e216ddbsi7975918qvk.331.2024.01.23.05.09.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 05:09:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ojTbrOL5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35314-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35314-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 90E381C27CD3 for ; Tue, 23 Jan 2024 13:08:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3548A5F847; Tue, 23 Jan 2024 13:07:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ojTbrOL5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FAE05F57C; Tue, 23 Jan 2024 13:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706015257; cv=none; b=qJct2z8SsTqBE0V9BCAq0PqBVqYUqyoukQeZ2U4GUe/gYO3dBHVd8TTua3LepNzkqqFwk4P896wut8A9v9tZaa7x83NoeRTA1Ex6LkOpNVgQfDUqEA5mboy11QjMViB5b0BauT9YS2ecbtUvJdB+JWVI1+HqnO+rU9FPlUiQMso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706015257; c=relaxed/simple; bh=QIawHl6UH5nEOFBUuWe4QbZg3ju5mdjdvopEqLdJLp4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=u/oFT9gJAp9oIp78sYQvvRLyhAkrSL2nWjOHB0dQJb/44GkPCvAURGxocUpOWbg/R3Atpcoskbzv/N77MF6pelJ6RRqXn53hq7B4VUPlZZMpY1XW4XW3/Liezn3pE4+YYLluytogAqfUFmwhkoxQJviEcIVn1cp9WPiZtEoQOaA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ojTbrOL5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D8BCC43390; Tue, 23 Jan 2024 13:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706015256; bh=QIawHl6UH5nEOFBUuWe4QbZg3ju5mdjdvopEqLdJLp4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ojTbrOL5OBHDkS/yeaqsAIFGdyFYDAUzU2FpmWlKum/Q+F683nNs7z40AF1AeMXmQ Cx85aS4IwWebfAKWgZiznCfgpS1gc7M/yAF2/Usp4adbNURkPYKZL5+hmhOmuu6BXP 3bNiJzHI6Z7/dL/5PvFmEQBDnXNyXg/JXHnvqipf4yfJdcZfXt8grEAliBrDQOGXBG B1dUFD65+4iBBERxwu9W8P+5uB0KjaSjNjz630tR3En4oflw2HufH8GQiCyUAKvpLX DQbbZF5K4Q6QdiVOBzF9pknP26i5b1wabNU5K1rJpFDSOidJ7+CY9pE0EhO0z1Km2F Cm+cEh+chJouQ== Date: Tue, 23 Jan 2024 22:07:32 +0900 From: Masami Hiramatsu (Google) To: Ye Bin Cc: , , , Subject: Re: [PATCH v4 6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Message-Id: <20240123220732.79d810aa183b3ddfd2b2a4ab@kernel.org> In-Reply-To: <20240123092139.3698375-7-yebin10@huawei.com> References: <20240123092139.3698375-1-yebin10@huawei.com> <20240123092139.3698375-7-yebin10@huawei.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 23 Jan 2024 17:21:38 +0800 Ye Bin wrote: > Similar to printk() '%pd' is for fetch dentry's name from struct dentry's > pointer, and '%pD' is for fetch file's name from struct file's pointer. > > Signed-off-by: Ye Bin > --- > Documentation/trace/kprobetrace.rst | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kprobetrace.rst > index bf9cecb69fc9..a1d12d65a8dc 100644 > --- a/Documentation/trace/kprobetrace.rst > +++ b/Documentation/trace/kprobetrace.rst > @@ -58,7 +58,8 @@ Synopsis of kprobe_events > NAME=FETCHARG : Set NAME as the argument name of FETCHARG. > FETCHARG:TYPE : Set TYPE as the type of FETCHARG. Currently, basic types > (u8/u16/u32/u64/s8/s16/s32/s64), hexadecimal types > - (x8/x16/x32/x64), "char", "string", "ustring", "symbol", "symstr" > + (x8/x16/x32/x64), VFS layer common type(%pd/%pD) for print > + file name, "char", "string", "ustring", "symbol", "symstr" Could you remove the "for print file name" here? Since this is not the place where such precise information describes. I think following hunk is enough to explain it. Thank you, > and bitfield are supported. > > (\*1) only for the probe on function entry (offs == 0). Note, this argument access > @@ -113,6 +114,9 @@ With 'symstr' type, you can filter the event with wildcard pattern of the > symbols, and you don't need to solve symbol name by yourself. > For $comm, the default type is "string"; any other type is invalid. > > +VFS layer common type(%pd/%pD) is a special type, which fetches dentry's or > +file's name from struct dentry's pointer or struct file's pointer. > + > .. _user_mem_access: > > User Memory Access > -- > 2.31.1 > > -- Masami Hiramatsu (Google)