Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp351748rdb; Tue, 23 Jan 2024 01:21:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIpjKih8N0tdJWYa8IMMPy0BmeWwgUh1tBD4r7oyv4V8kstdJvnUwzaTOERnisNGnFMVdw X-Received: by 2002:a05:6a00:2e20:b0:6da:caf9:5e4c with SMTP id fc32-20020a056a002e2000b006dacaf95e4cmr7273385pfb.9.1706001678169; Tue, 23 Jan 2024 01:21:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706001678; cv=pass; d=google.com; s=arc-20160816; b=pmm+K2V491/wipvI+Dy4Ba9SDU/3oVYOfTJj6xCLDdU2l2Rrcuywl1XS0Ups4uiw1I 12o7RAbthw4oDH37qZyJV1bc1oP+WR9wAte9whBPAqsmT5YXLALnl+WK9zKf12IV9lVg LSuVI4A1mOOZvR+tXoZh2bgDcnwmk07W0sBcB4Ghw68BjDiktmW/iAxmtM1+rbNjKz58 PsD6Lx0aMqH7RUXje2VKH3wCKCkQyQi+nxjX1hmyME7xjjL5kcBPrjGuq7YZcwuxZQQi VOKlb+nhFOfxhO4VLEkYbJR7wmGiLhAGXM5O2rgUDBoDYrOY/mNe6IPcol3dn/ZbI4FU vRDQ== 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=dFOqz2dRVG1lZQhZHTgeLw+A9HqhtcNk4PmMkGz/c1U=; fh=Us/DORbzHj5XmgnBeJW+VlCBdo2pSXKHAejHonylCvY=; b=zHy+6Y68piXS7YWmA8WWDhDRmiRot8qRQXoBVWKX8iQGg9IuL0NAblfNHGgmIa1TDw i1P3v3SsmA4KoF/+dHaQ1mKmmYITrN3ZxpBxRKuH9ABARGVWlLBfEiY80IkfbBfP1Ups 54F7wxWUjPhYh1TPpsVnfI3cGDpl3eoKV0otKLIvd3LpE8MYSbJkGketwHQcyVQ8Z8Vo oyMC7glvuf8TcOv+91cwt9PQ5fN5Zat1QMBDeCWi4QH5jD9+PRooX78CxkgghZgMbLeP 14uRMfTFvTjFj9C/E7osN+Nj6FNuedalPExmzyv90PHgddC4BHMtMCnJdu9NQyQPjmtS X1fw== 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-34984-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g16-20020a056a000b9000b006dbc8c98c19si6453983pfj.24.2024.01.23.01.21.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 01:21:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34984-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-34984-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34984-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CBB74284CB6 for ; Tue, 23 Jan 2024 09:21:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F9BC58AAE; Tue, 23 Jan 2024 09:19:37 +0000 (UTC) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (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 656DF5C60D; Tue, 23 Jan 2024 09:19:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706001576; cv=none; b=Tp2Rdwv0q7epr1Q6Qd+RvyyoRpjuK7O0dKLfrKglIWdtDysruU3QLxHs++LNLwh2RTCjh35OfhDngpGnfRDDejMbBmyZUYYhOvZJwi+uff4Y6Gt7u2g0pc/HyLCvyjbXDsmDZfyTetvB4mlZ5cfW9ZRGN1mGqPql0iy4xiMX5pM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706001576; c=relaxed/simple; bh=IZ2ztT+g8180deg7EL3rrFcIgg1N/vQXRmntkTF7fOc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jtSYB9ae66ZsJKTBY2vqJEZdae2Tq9LD4+jBJmCx4or2XeGKiyLijZBmYzOO9dVHF01MURY70H/oqTVFq+hQ7Zt6pUqJTaHGdg7TMm31ABvPVZqB5R8ic8holzYgoNmHMoX02/nmLcyCWnwJtebhLMn/WEUOhYgPzbYB0Py8/jY= 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.189 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.162.254]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4TK1jY39PYzNlQ6; Tue, 23 Jan 2024 17:18:41 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id 31CEE180089; Tue, 23 Jan 2024 17:19:18 +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_128_GCM_SHA256) id 15.1.2507.35; Tue, 23 Jan 2024 17:19:06 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v4 6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Date: Tue, 23 Jan 2024 17:21:38 +0800 Message-ID: <20240123092139.3698375-7-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240123092139.3698375-1-yebin10@huawei.com> References: <20240123092139.3698375-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 | 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" 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