Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp235182rdb; Mon, 22 Jan 2024 19:18:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNkfVCqZ2cm6nZNMXtQZj8T/kldKllJGY1RKtgJVj8CV9Jl71UHoltwiSrzQRdoQOKAPqG X-Received: by 2002:a05:6808:114e:b0:3bd:9a66:758f with SMTP id u14-20020a056808114e00b003bd9a66758fmr6060587oiu.46.1705979939194; Mon, 22 Jan 2024 19:18:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705979939; cv=pass; d=google.com; s=arc-20160816; b=jie0jBnhqkZ5Bp5AF/c5O6G0QsgghrW4U20N6VfoZvBd5MH5M+n/tIOidhj2YxdZJF n96N0FnSAllc99AYelLl9UkoQSdozUb4A+smVdiiKYa7sL+HtnlJDfyhPk0yNNSkiNwR QEgq+c++m6kQS3r1z0K5ZIFTldmkuzWGCUbfVL8ay5nDmatBpQPaiK299fRFwaKDkNvf RftEqABF3Z7L2KExE5DK4TuSbGojy05zVRWhf3LwbbUDs8hUjmWgMZgNmU+6JAeYH7Uw n0izs0nSVMLK8HmGf1gQCKCMFpvO0dsCwQu67CtatwUBxh2SJFSp6aGzODS3qsdOZqOZ AJxg== 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=s9abdoX66RfWCWVJL226a72Y7ByxkLx5xrvCytmLesL/l+O7r43kY8AqA9DwNph0GZ HUqGJBdUWHjKoW+cig3kVkh09ReWCEIrqrXtYW9Rz72C8azuMRhSyEfBHqPGRaTLIGE3 EGmg6xnEL4alRtesuCnUSCompgpKavLSbk05UM7bqoWqF9OKBF1YHgDF7SXHHPOoompE 9W3kEPPo9ACuhqeNXlxt0XmAB1CtpJk41MQathyJplRAcaPtU9POSgSmsTz8wsd5oGeW P/4emCi3wl5FklPGhGiPl+ylL10NExiJO0oYygfb4l9r3i6J1ndNq+KXkcCKFtI++hGk JBwQ== 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-34655-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34655-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 21-20020a631555000000b005cdf37ce92asi9291970pgv.705.2024.01.22.19.18.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 19:18:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34655-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-34655-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34655-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 47C50B2180D for ; Tue, 23 Jan 2024 02:55:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD4131FB5; Tue, 23 Jan 2024 02:55:17 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 3CB5D374; Tue, 23 Jan 2024 02:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705978517; cv=none; b=Df1wFzcR9bjo6PyOQxq7ar63xm3JUyaOccwvkOs9JYIsdeZA2xia2ubDTnD+3CiZIOIDqLVTCD2oCkdRvCdZdnkO5UszF4+nQ3YxO8PhywUkaIE+6oXGdVXVotidbGBeIOOB7U1RNoocLR30s+81hP0sMXUX9ryqNxQCIp4BO2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705978517; c=relaxed/simple; bh=IZ2ztT+g8180deg7EL3rrFcIgg1N/vQXRmntkTF7fOc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pMRR98SMobb9LeBojXpV+EHoWh+tENKbSsPSNKVZYyJ3Pwa+mHGn0+GaxW0JMy8Evm07c8eDYUrmZBlnBeLTDhUtGSxfXZ55kj/vSmDOh19bpmrNI8KceicIrg/994xncRvc7WEz9mKe6Rj0qKwgM6MEnrG/JMP8QrYqQrf6lHc= 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.191 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.44]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4TJs6450xNz1FJfN; Tue, 23 Jan 2024 10:50:52 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id D1F94140485; Tue, 23 Jan 2024 10:55:12 +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 10:53:35 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v3 6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Date: Tue, 23 Jan 2024 10:56:07 +0800 Message-ID: <20240123025608.2370978-7-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240123025608.2370978-1-yebin10@huawei.com> References: <20240123025608.2370978-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