Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp598848lqb; Fri, 15 Mar 2024 00:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUWskDMjxLfrssK0K+b6JXRXqIxMnI6G00N7bTNO//Bzo1+z5Ntwjw9biCTXUXJY8gqrJObaUlsT3KapNn2QLY2FpxLwS4EoFZbdcUwQ== X-Google-Smtp-Source: AGHT+IFXNX+aTch1q8XCLtvKx6IWF823gScBoArlDeP9CqVooKAC5JDAROhsxYaGMV+oOQw8dEZu X-Received: by 2002:a17:906:4c54:b0:a45:f94d:db4b with SMTP id d20-20020a1709064c5400b00a45f94ddb4bmr2774561ejw.35.1710486953769; Fri, 15 Mar 2024 00:15:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710486953; cv=pass; d=google.com; s=arc-20160816; b=Yen7GLVRVu0KIek+GCCiDcOX2KF7j2KO99sxb2VQnaSvGhboHBhsNqM8LjwsnKJHjE vrlE7QIjo0IL96yNB7lYJRobTkaI/c68SOf50xme93steEh5SqkJiJuUBcAeZHYmN4dU 0d5KG98DlaLEe5Mg4HynN/1iKcGoQ9FP+E9Zbcc+JX7y62wSufV9ysTayk+e6f/eqSB0 4r9J4z7NazoJ9jxdzKdeSazywoxgEfzgErQ6PupFKT5k+TaZmEOThYMWJP1xuJ3Iq1sC 8uuu2WV3PSXMFrfmCwNlZZulOPOhKjHErDIDn7n7cDVt1ouzaU1caF+gxhufEeB2Pg/Q ypzQ== 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 :date:subject:cc:to:from; bh=Y1gaWXZItRDtMmmu8Y/0+zpSgKReEb0ObQqf6ng97x8=; fh=Us/DORbzHj5XmgnBeJW+VlCBdo2pSXKHAejHonylCvY=; b=y2zUaImG9xTE5gpGpAlnxHmP2Ol0Qq/amexT6AEgXbXRoN4xv04pudIHgU18KX3+EP VUX7K+l6tGzpYbbRxflb3vPtwfmsrBwLcn5eTx3bj/Ijz/ax2s5k7ytDoYPAA+2dhTSt 4AjVeYAtqeLrODcCXi/v7M73AR8RngoafpUSrbKLnmAz9xcvlUks9y1UAURk0VUrvo3A AZK5qBZizneaT2VFSerp8LBuuxaVNEzC4Iu0Jby1b5tx8fU2soBoK0jZwsa72Eo7zFFq XraQWabQ5QMehPZHDzL0qZgVDlWkRi80NtPDsPZ4ChId9+jBsvWod2mOd8PRcjKdQBc7 Klxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-104100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hd20-20020a170907969400b00a469368a86csi21969ejc.344.2024.03.15.00.15.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 00:15:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-104100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4B4501F21436 for ; Fri, 15 Mar 2024 07:15:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0922018EB3; Fri, 15 Mar 2024 06:54:31 +0000 (UTC) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) (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 C99D918C1A; Fri, 15 Mar 2024 06:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.255 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710485670; cv=none; b=cb7OEMGu9BmdVpaFYSf16VCVNHOF9ny5HuzsXd4U9P5ZwWyxts6/6gj37hQTvHmCoxmnqJEv0AMDD/DyqO7XhjJq9Dp57ygMuLAvwwdR3Dod597o2WkNUIKoxdpDMSANzlsCD0rMRQ/UO9WSCHa43VU3kAHX8UDx/+jY6qojGd4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710485670; 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=g7KS1PM1on3NYrnjE3fuOr78pXtURBqKjE0O0ElJvTNDiPng90NiYrBNQ62U1oi7uD+DdeZySExi94AkZUAd34Rn08KRVB09RzIuknZhBOYuDbuxe5YWSb16UKXzzniJu8ahefsQncAhp2NibiG2+LOm+yZXmjpwPvyjR1z95PI= 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.255 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.163.48]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Tww0W2CXnz1Q9kS; Fri, 15 Mar 2024 14:52:11 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id 9516118007C; Fri, 15 Mar 2024 14:54:20 +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, 15 Mar 2024 14:54:20 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v6 6/8] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Date: Fri, 15 Mar 2024 14:55:38 +0800 Message-ID: <20240315065540.1181879-7-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240315065540.1181879-1-yebin10@huawei.com> References: <20240315065540.1181879-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: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500010.china.huawei.com (7.192.105.118) 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/kprobetrace.rst index bf9cecb69fc9..f13f0fc11251 100644 --- a/Documentation/trace/kprobetrace.rst +++ b/Documentation/trace/kprobetrace.rst @@ -58,8 +58,9 @@ 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" - and bitfield are supported. + (x8/x16/x32/x64), VFS layer common type(%pd/%pD), "char", + "string", "ustring", "symbol", "symstr" and bitfield are + supported. (\*1) only for the probe on function entry (offs == 0). Note, this argument 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 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 address or struct file's address. + .. _user_mem_access: User Memory Access -- 2.31.1