From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E18DC4167B for ; Wed, 13 Dec 2023 00:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EUoU6dG5aRWs2evu5W8nYqJO+h6S51845AH7unmXIhs=; b=BQPcDEkP0Fl1LX +DMT5QU8ALhwKAu2Xtz6+bwI2f8lJikm3FJdsQetcAYzmPAccehShdEuHLGCZ9Ouprzc6D2rGCIcD YuYxWpVjVZFTe1cqrUYayoKbNpOMF7NSVh3d5St85/wJxXD8ZRVo51xz/b5JIGGlYRZgJLMv5TIPC NKtPTQoO/p8JEOyq8po2MNk6qfdFqsDnuWjfyO2AU2Laqi8P9PrsAgmrchrPy/7wJcWjzG9PAjjgY zd9q9ZzUWCdKVBb2ye/jqPHAgBo0YyOrfqTxAM/5KZTYBqEOzxTZ/9l1AqVEGVw8Kw4CSidytabcB k6r3okoSF4OLRlzgBgHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDDM8-00DDbV-1A; Wed, 13 Dec 2023 00:44:08 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDDM5-00DDZO-0O; Wed, 13 Dec 2023 00:44:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 93A08CE1C64; Wed, 13 Dec 2023 00:44:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04D94C433C8; Wed, 13 Dec 2023 00:43:58 +0000 (UTC) Date: Tue, 12 Dec 2023 19:44:41 -0500 From: Steven Rostedt To: Alexander Graf Cc: , , , , , , , , Eric Biederman , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Rob Herring , Andrew Morton , Mark Rutland , Tom Lendacky , Ashish Kalra , James Gowans , "Stanislav Kinsburskii" , , , , Anthony Yznaga , Usama Arif , "David Woodhouse" , Benjamin Herrenschmidt Subject: Re: [PATCH 08/15] tracing: Introduce names for ring buffers Message-ID: <20231212194441.2701c48b@gandalf.local.home> In-Reply-To: References: <20231213000452.88295-1-graf@amazon.com> <20231213000452.88295-9-graf@amazon.com> <20231212191546.603c0703@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231212_164405_381623_0EBB28E1 X-CRM114-Status: GOOD ( 20.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 13 Dec 2023 01:35:16 +0100 Alexander Graf wrote: > > The trace_array is the structure that represents each tracing instance. And > > it already has a name field. And if you can get the associated ring buffer > > from that too. > > > > struct trace_array *tr; > > > > tr->array_buffer.buffer > > > > tr->name > > > > When you do: mkdir /sys/kernel/tracing/instance/foo > > > > You create a new trace_array instance where tr->name = "foo" and allocates > > the buffer for it as well. > > The name in the ring buffer is pretty much just a copy of the trace > array name. I use it to reconstruct which buffer we're actually > referring to inside __ring_buffer_alloc(). No, I rather not tie the ring buffer to the trace_array. > > I'm all ears for alternative suggestions. I suppose we could pass tr as > argument to ring_buffer_alloc() instead of the name? I'll have to spend some time (that I don't currently have :-( ) on looking at this more. I really don't like the copying of the name into the ring buffer allocation, as it may be an unneeded burden to maintain, not to mention the duplicate field. -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel