Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp715509rdb; Thu, 18 Jan 2024 17:36:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEd1FgepZbIflPJqxuAPHEAB9/vFx4fbL55oUackLN0L6uLVrfKKJFgr3Y5e1vqbdFs+yXI X-Received: by 2002:a05:622a:394:b0:42a:129e:7cfc with SMTP id j20-20020a05622a039400b0042a129e7cfcmr1801253qtx.40.1705628190649; Thu, 18 Jan 2024 17:36:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705628190; cv=pass; d=google.com; s=arc-20160816; b=DhwD+gTO3IYeb1WPrPh37cbUUXmv7Z6oJnFEZXqYxQa4YfJsup6nCJBXC8mBOylG8L MkblG61ljSA42nrZNY0cAC4r8a9+9WuuK6DKxAg+vqc/ng9/A6/k8GboMzvTTjUkLAhU st4BBn7zIN4Hh9m2lkCfqZ/I/4hYKBoI5y9SBbeGTfplmaFT3eLvqawQEqrvg4VyZ8JF lCibcjRc92lJH3LH1RVsNjdtBkMiwXhrwkVMil7E0Xf3xAbAzTK5B3qxWCSz+JbzsvFd VgVqc1BxLCHXT7th4nYPAwd/z2EKawON1s9JC4lIyLeNeO/HfUfg4XAyPW+0XZEwcO/D xLnQ== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id os39-20020a05620a812700b007817608c62esi14723953qkn.659.2024.01.18.17.36.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 17:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::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-30685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30685-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 69EC41C21AB6 for ; Fri, 19 Jan 2024 01:36:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B74F817C9; Fri, 19 Jan 2024 01:36:20 +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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500010.china.huawei.com (7.192.105.118) 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(-) -- 2.31.1