From patchwork Fri Jan 19 01:38:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Bin X-Patchwork-Id: 19164 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp734197dyb; Thu, 18 Jan 2024 17:37:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IElXvAvCdly7U5VTsXx1rfCDWESewGkigqWol9LlXc7/+RWg0MKU0tXrmnUcy+65Y88BRy+ X-Received: by 2002:a05:6a21:3998:b0:19a:f7de:3af3 with SMTP id ad24-20020a056a21399800b0019af7de3af3mr2010776pzc.71.1705628229634; Thu, 18 Jan 2024 17:37:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705628229; cv=pass; d=google.com; s=arc-20160816; b=OifNw/lzEaPEnl7Adgx8LRPOXfuXTN2nNvTs8adW7Xde/GHEBkkDK3nBpheNJ2CLJ5 hPKWvDd8rs0fMP016TCkYYsFW859jTaatvgBd4/kc86T0KSJjuvhfDjZ4kx8yWm0JK46 MGELo67BFqOd1qWKzMS0Ibi6j6WMder99Zn4APlMA3v9QqVY9vuZ1qVPh28jLFYmUFGx nO+k+2jPiT5Y/zlcWb62etlIEO9IVdPqcHyQT3d7P/sa9NpkfBCan7kDVA0nVb1MH+7A lb7QzzBxS4rexkxagTTyyT3wRXS7TlphchYqBdxgzU3TjBtLRFcUPHNurIQCiFa+waSa HHDQ== 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:message-id:date:subject:cc:to :from; bh=aoW+HGbkhi5CDcSVUfkZWvf4yMUxv/U+gVBDimaFXdQ=; fh=Us/DORbzHj5XmgnBeJW+VlCBdo2pSXKHAejHonylCvY=; b=Xe5l9lhkuIu+LzRkhUOqAl5EP+/WAC1F1h00AdTfouZrXo8SEUZLgt0N2hMdGrBNCw ZUdqLmRU8VMX3GsvEXlvc1A097hQb1JaOpw+xlie6ZIcLnCQKdOc1QxSIlQV+w/X1AHF 3q0nRDLCKUFztAbtYzgH5iSlfypfqujWWtoRc1UZY7KKjsHRax7K9w3gQPxrjOYkvPCb HjeBp1tkR/jyMB5MiYmOCYt0p8Kp3dn/zwiffALDlashLdNU6ITLo0sUFmNgNLqri9zi nvhbc7wqhJ7q6B2MLBjtS6USDQAj10JgkfyjaXuIsU+6B767q+1u4UZfFDHyIZE56ud/ qhmA== 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-30685-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30685-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h4-20020a170902f7c400b001d720fe91basi45552plw.389.2024.01.18.17.37.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 17:37:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30685-ouuuleilei=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-30685-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30685-ouuuleilei=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 7C6902834DB for ; Fri, 19 Jan 2024 01:36:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFF0A4A15; Fri, 19 Jan 2024 01:36:21 +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 BFA66EC7; Fri, 19 Jan 2024 01:36:17 +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=1705628180; cv=none; b=pMmxCD3VupRCAkMNrdXYq/suZuyIP4nbfRRLtxmzYZB0gyXsqVUu+/2A0h/k2p6jJJPpLMOe0tkP7E7UEHz2gH0cLPLDBCVkSAAn36+x6y4faOCF806Vm6PUNY+8Kfqz775NSMv4dI8ckSVZEVHnByZsnYejWr3wfjlxovtI3oM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705628180; c=relaxed/simple; bh=FuC0kEmZfBf7U/MDt0gJdriiIyRBZ51V3J/u2QRfekI=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=n46JAHCFAF33CnSdqXUC2HLJs395QS/c2kpzZWvGEbzTr+BHI+0YGt4RRCyzoNzQ8mBdWPZQWs1m3m50aqPQEph161Q1SXyO/+bQhVjp0XqOR8ngF++3HTEM5azSGsjqtzgyXVqlGZFrlwd8suJ2qJEwKtcBSaRI6kZz43NQtOc= 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.162.254]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4TGMdQ2DZ5zGpnJ; Fri, 19 Jan 2024 09:35:54 +0800 (CST) Received: from canpemm500010.china.huawei.com (unknown [7.192.105.118]) by mail.maildlp.com (Postfix) with ESMTPS id DDBDD18005B; Fri, 19 Jan 2024 09:36:14 +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; Fri, 19 Jan 2024 09:36:14 +0800 From: Ye Bin To: , , , CC: , Subject: [PATCH 0/3] support '%pd' and '%pD' for print file name Date: Fri, 19 Jan 2024 09:38:45 +0800 Message-ID: <20240119013848.3111364-1-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500010.china.huawei.com (7.192.105.118) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788480826501543177 X-GMAIL-MSGID: 1788480826501543177 During fault locating, the file name needs to be printed based on the dentry/file address. The offset needs to be calculated each time, which is troublesome. Similar to printk, kprobe supports printing file names for dentry/file addresses. Ye Bin (3): tracing/probes: support '%pd' type for print struct dentry's name tracing/probes: support '%pD' type for print struct file's name Documentation: tracing: add new type 'pd' and 'pD' for kprobe Documentation/trace/kprobetrace.rst | 3 +- kernel/trace/trace_probe.c | 50 +++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-)