From nobody Wed Dec 24 17:58:11 2025 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (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 6FF7F12E51; Fri, 22 Mar 2024 06:42:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711089727; cv=none; b=J9ipZFui5HUDJ4LhQwckuSyPaMsoUIKzUkfdUo4UjPk1cSIj8s2CQe93Yw613AY5+Onk8fd3iwxxArzcqi23vcZ0y1KiW9invv/cwTAELsZUXd0iCf0/dCTHWC8EdgasKI/8Az0XxmOJYGbpBCPdZpuRYqaAe+7uWTt+F7H4uIc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711089727; c=relaxed/simple; bh=erOBzZetGQeOc5+oyau5RI5nfAQAu9VK/IeB1+EeIo4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mBfwMk5fZtCE8uZyojHCJpNyvhWmG5nRZD8U7AgKU8fL+Qc6fAgz7vLjjwsRhOcRK7ZLfnEaQyBTP6qnnbg/m837YVVfrGhp3wU01sKXYlltNN8BF3kvDDM3nGkVFvGh7ldRM55qRnmv0Lza8FNro9Y0MezNVeiWBxaQSgtvZFE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4V1CQb0y90z1vwgl; Fri, 22 Mar 2024 14:41:11 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id 336AD18005F; Fri, 22 Mar 2024 14:41:58 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Mar 2024 14:41:57 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v8 3/5] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Date: Fri, 22 Mar 2024 14:43:06 +0800 Message-ID: <20240322064308.284457-4-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240322064308.284457-1-yebin10@huawei.com> References: <20240322064308.284457-1-yebin10@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500010.china.huawei.com (7.192.105.118) Content-Type: text/plain; charset="utf-8" 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/trace/kprobetrace.rst b/Documentation/trace/kpro= betrace.rst index bf9cecb69fc9..f13f0fc11251 100644 --- a/Documentation/trace/kprobetrace.rst +++ b/Documentation/trace/kprobetrace.rst @@ -58,8 +58,9 @@ Synopsis of kprobe_events NAME=3DFETCHARG : 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" - and bitfield are supported. + (x8/x16/x32/x64), VFS layer common type(%pd/%pD), "char", + "string", "ustring", "symbol", "symstr" and bitfield are + supported. =20 (\*1) only for the probe on function entry (offs =3D=3D 0). Note, this a= rgument access is best effort, because depending on the argument type, it may be = passed on @@ -113,6 +114,9 @@ With 'symstr' type, you can filter the event with wildc= ard 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. =20 +VFS layer common type(%pd/%pD) is a special type, which fetches dentry's or +file's name from struct dentry's address or struct file's address. + .. _user_mem_access: =20 User Memory Access --=20 2.31.1