From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752934AbYIXVvy (ORCPT ); Wed, 24 Sep 2008 17:51:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751771AbYIXVvr (ORCPT ); Wed, 24 Sep 2008 17:51:47 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:53976 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbYIXVvq (ORCPT ); Wed, 24 Sep 2008 17:51:46 -0400 Date: Wed, 24 Sep 2008 17:51:43 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Martin Bligh cc: Linus Torvalds , Peter Zijlstra , linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Andrew Morton , prasad@linux.vnet.ibm.com, Mathieu Desnoyers , "Frank Ch. Eigler" , David Wilder , hch@lst.de, Tom Zanussi , Steven Rostedt Subject: Re: [RFC PATCH 1/3] Unified trace buffer In-Reply-To: <33307c790809241403w236f2242y18ba44982d962287@mail.gmail.com> Message-ID: References: <20080924051056.650388887@goodmis.org> <20080924051400.195780424@goodmis.org> <1222268595.16700.149.camel@lappy.programming.kicks-ass.net> <33307c790809240847r31c8b683na15ff5488b60d25b@mail.gmail.com> <1222272686.16700.162.camel@lappy.programming.kicks-ass.net> <33307c790809240949i3026170i8f9ac1d67a0fcf00@mail.gmail.com> <33307c790809241403w236f2242y18ba44982d962287@mail.gmail.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Sep 2008, Martin Bligh wrote: > > How about we just steal 5 bits from the timestamp to indicate event > lengths up to 32 bytes, and if it's 0, that means there's a length > field following? Also that'd mean you could use a longer length field > and get beyond 256 bytes to 4096, without impacting most events. > > struct { > u32 length:5, time_delta:27; > u16 length; > u8 buf[]; > }; > > struct { > u32 length:5, time_delta:27; /* where length == 0 */ > u8 buf[]; > }; BTW, if we declare the ring buffer to have fixed length entries, do we still want to record the length? Hmm, probably should. It would make the code easier. If it is fixed length under 256 bytes, we still need to record the timestamp, and the length is only 5 bits. It could probably store something else, but we can leave that for version two ;-) Heck, for now, I'll remove the work I did to add the fix length option, and just use this default. If you have fixed length entries, it will just make it easier to code the above layers. -- Steve