Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp171781rdb; Sun, 21 Jan 2024 23:39:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGt/mClzAlhxpG4IHMUGcfiyImKwr2QdM5RN29RrKDdrNA2zjGJGA++Az+K0rOr/ELhMbts X-Received: by 2002:a05:6820:810:b0:599:4875:3173 with SMTP id bg16-20020a056820081000b0059948753173mr2438980oob.16.1705909174836; Sun, 21 Jan 2024 23:39:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705909174; cv=pass; d=google.com; s=arc-20160816; b=ULxFFmcEve3XqOytXRSOLQco3o2T+MJiFi1AZmSQFquMAAezhYdftu/Fe6nL1nagR+ RnX8nlmTRFwGrUGauCfNioOccbjEoiamwSGeVkYzBJVcq/4rBhVtDBcNwYON/5hZp/o5 ORE2yuabJqmdlWl9gLZFShqqTgYOt5VSJUNmmPuyBqKY2bRoO8UksNfnZEcetYyRAZkz 4HXNkWw/9+WnvPw2T5ttaJfsZ6Se+NbViuqSbZDl/H8tqmQzZWGR/yBohfI5E8unXqHG Ka4fQBJg2U6RgMg5FcERpI2+iI0LWnutLKu1m8s05VbcW2jTgf3hUsVM+B1ujWYqxJYi Bgng== 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=oo2f4zMLKEJqeqjPzvlD0p6c3XOnVc7RdkxHuTBSVDaUrPXGKXlL66+NuwcbczvAuN uHw8v2FMcSdBUQMH2QwvvMb0gwstxY6H4xBOkl2ex/t+APVhrnnJus8qEBCzzBHiFKda kU7bUvTlfkfXe9IiZ53ij1Hq+m0HJFwBPoz3oz15le+ND6z3pIrrPUYPCJ+GOZU6zIgk /2fdBOWK7oEBfHuasgm97ifJVd1ZSMuTknV/HzXiivw76am/nkeN0rV2MWLeDn837/9E Ew5FDf55fxcqPaSoLFz1yJIEKibXRTMxkEhbcfun2c9igggfydctoZH6DBTGnG4OxE0I 4R8w== 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-32440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32440-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c14-20020a63da0e000000b005be03f0da68si7656033pgh.13.2024.01.21.23.39.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 23:39:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::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-32440-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32440-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 735BB281AD8 for ; Mon, 22 Jan 2024 07:39:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A477317C68; Mon, 22 Jan 2024 07:39:02 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (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 CDB6A168AA; Mon, 22 Jan 2024 07:39:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705909142; cv=none; b=PU4CsH6YoOS1MtXlEfw8dNCvfxgrdPR39sCSgJkOwqnOs0OqsMbOWLNiBNMAYs5co9fMri2QFmbyM+TuX1buxWmiqe+VivYso/eJiGj97Q88OEV8ztXXQbyADE4wQ2Ge8fU4AzH6baPBj98WvX1/dlzbG6SbjE42BZyizNSUah8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705909142; c=relaxed/simple; bh=IZ2ztT+g8180deg7EL3rrFcIgg1N/vQXRmntkTF7fOc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DQ6elbccLNCRkKTj1QRYWxlHcgDPb8pkrKKwBBx1kt7scfyAEnDZLcsH0QVwfo2KRcSGpTt4A8CRDyntrhLPfo5F4l9K0p+x2veUumpbvNzTWG2PrVSTfJJCcLPOdcrC75SJ6JSy4/Z5fXmcSCOPNAuHs9+3PA2NkSrTVVraOT4= 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.188 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.252]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4TJMXX6lbvzbcGP; Mon, 22 Jan 2024 15:38:36 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id EB71D1850C9; Mon, 22 Jan 2024 15:38: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_128_GCM_SHA256) id 15.1.2507.35; Mon, 22 Jan 2024 15:37:41 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH v2 6/7] Documentation: tracing: add new type '%pd' and '%pD' for kprobe Date: Mon, 22 Jan 2024 15:40:14 +0800 Message-ID: <20240122074015.4042575-7-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240122074015.4042575-1-yebin10@huawei.com> References: <20240122074015.4042575-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