From mboxrd@z Thu Jan 1 00:00:00 1970 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-trace-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