Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp554434lqp; Thu, 21 Mar 2024 08:45:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULnhlyO8uk8wqBnuTZiP7tgmSMvOaIcuvmfkvPTfboVMgjAeQ/tH6EiSqjo0FFKEPCGtXoP+sWKRdWBG3WjEm9sL9IDVGgQF6mO64afA== X-Google-Smtp-Source: AGHT+IEhnmLYY1gIROulwbNVMV7+Rkq9RTCuEMeywuyKTGdhBNTLX5h65dRDJEsiTm0cOOa0IQLE X-Received: by 2002:a50:d79a:0:b0:568:9f77:9c0 with SMTP id w26-20020a50d79a000000b005689f7709c0mr3024068edi.4.1711035900456; Thu, 21 Mar 2024 08:45:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711035900; cv=pass; d=google.com; s=arc-20160816; b=m/YwNbsmib0meJBKxLDemwLZS9wsRooL1vRz2gxElkm6RwYA468l5fy8MpyYxCUv5J ljDkXuYxnnCe0SodIArjheB+UTvt8BeC94EGJHN89YeduR6eaKskXF2uY8GimxcewVT7 Pko7C/F0XJPczWvdTvVqtxwZ1ve/N2GN9dWES1qXa/KTF82zlhNnTK50itFVHOO0QIsM p8j2YqOdaZWq4nMrGIqEVe7W67PqisqODO9BkDmYIo6yfl9yN7db1RnIUOE/VxnzZUu6 54Lworx2L3q8l9PyqKiuxy1BjGz9BY9Y9r0EJj3t6LnqAg5KFGWOnwJ+06AOpiKGNnF+ QyPA== 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 :subject:cc:to:from:date; bh=bSKpIFNPzAdguZMYy8ujVrCjK8AwV8gOVl1H+lvCcbM=; fh=oAUG/CiQ3c1zuquJB6fiUvXT85e2e943kynEe8c2qUc=; b=dkIBWv9PPVopqizX6E9WIz+HXun+IPT7GJrmoCDtoPvDQIGifZyt+hO42tMJ7a0ied 7lyGx1VoCYbTROOHl0WkphWiwLN0SdcPZdLMs9DjajDpWToUjKG85IoxxCfg8XdP0rn/ u9XU/J5jJkMnXuhtsKEvuR3sA/uwBYcbo4Gca8syroeZRbH1ERdAREUuxEPOA59YYsfn RAUng34sPIcEAXUkrqR4RbsE2K8xQEpTF394kSyDT/VkRhCOK+HDDvo4XCYOyzxgElOM iDuKoB/fOKiiJDtyZSsw+bCUMyJ0lX5AucD/adq4tCfEYVmkOiHzCslyMO3PZewe3nWz 7zgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-110271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110271-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w5-20020a05640234c500b0056bd49c466asi5689edc.317.2024.03.21.08.45.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 08:45:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-110271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110271-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 20D921F21600 for ; Thu, 21 Mar 2024 15:45:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3326486ADB; Thu, 21 Mar 2024 15:44:11 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 AED2B3A1DD; Thu, 21 Mar 2024 15:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711035850; cv=none; b=RtYxt64Q/yHSV9F9x4ZGU8vXiIeSPJzBuDY2Ae/AlIqfE52t86tITAsqcHmnydcBl2HoOSZ87b2zntAj9GB+C8uRQjucRp5uhYTrnFx9D+S0tGfgueyiIkn2xueFZ9tkcfEW9MN2qfY6PcfrX3KPj8f9JwjNe+GWbs88/9uq4nM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711035850; c=relaxed/simple; bh=cTCVXG3LA1UgfV++ZX8LGO7BlD43EmFcKlyQPgaKLPc=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=M05UYmYGiE6jc6ZXQT3z0cqsG6cN6swEz8UGaScju/k3H69cX4gSh4H9ntZm9WdZzaO6Gih2lHukb0/o+yeIbLU6FvAFluI2ULzzHcxqcOMXpq+YHJxd0cd5nLXn7A5LsHu0KysF9bf2xHiqGsQr360skupiJ63ue4926t7MOuQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3273C433F1; Thu, 21 Mar 2024 15:44:09 +0000 (UTC) Date: Thu, 21 Mar 2024 11:46:36 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: Ye Bin , , , Subject: Re: [PATCH v7 1/5] tracing/probes: support '%pd' type for print struct dentry's name Message-ID: <20240321114636.5ed19630@gandalf.local.home> In-Reply-To: <20240322000759.ec04bca3bb2afdfaef37a545@kernel.org> References: <20240320132924.2802187-1-yebin10@huawei.com> <20240320132924.2802187-2-yebin10@huawei.com> <20240321101547.1f4e68ab@gandalf.local.home> <20240322000759.ec04bca3bb2afdfaef37a545@kernel.org> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 22 Mar 2024 00:07:59 +0900 Masami Hiramatsu (Google) wrote: > > What would be really useful is if we had a way to expose BTF here. Something like: > > > > "%pB::" > > > > The "%pB" would mean to look up the struct/field offsets and types via BTF, > > and create the appropriate command to find and print it. > > Would you mean casing the pointer to ""? I mean, instead of having: ":%pd" We could have: "+0(*:%pB:dentry:name):string" Where the parsing could use BTF to see that this is a pointer to "struct dentry" and the member field is "name". This would also allow pretty much any other structure dereference. That is if BTF gives structure member offsets? -- Steve