WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sizedfieldsfor

To: "George Dunlap" <gdunlap@xxxxxxxxxxxxx>, "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sizedfieldsfor exported xentrace data.
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Fri, 8 Dec 2006 10:52:38 -0000
Cc: Keir Fraser <keir@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Mark Williamson <mark.williamson@xxxxxxxxxxxx>, Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 08 Dec 2006 02:53:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C19D9E49.5A28%keir@xxxxxxxxxxxxx><8A87A9A84C201449A0C56B728ACF491E04EDF2@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <de76405a0612071025l55722c65r5213faf2e93f454c@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccarbZWOo/WC8m4R3SZ/IB2i+PObwACBpjw
Thread-topic: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sizedfieldsfor exported xentrace data.
> On 12/7/06, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx> wrote:
> > Ideally the format string would include the 'pretty print' format
for
> > the post processing tools (e.g. put the strings as literals in a
> > separate segment and extract them later in the build process. That's
not
> > attractive if we have to parse the strings at run time, though. It
could
> > easily be fixed by pre-processing all source files with M4 or perl,
but
> > I don't think we want to go there.
> 
> I should think that parsing the strings at runtime should be pretty
> quick -- we don't have to actually make text out of them, we just need
> to scan through looking for % tokens, determine the size, and copy to
> the trace buffer.

It's still a bit gross given that the string doesn't even need to be in
the executable and we knew all this stuff at compile time anyhow. 

If we did this with macros we could use sizeof(_x) to determine how many
bytes to write to the trace buffer. Os is the intention to deliberately
truncate some 64b quantities to 32b save trace buffer space? 

It may be ugly, but it may actually be possible to do this with the C
pre-processor. 

Ian


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>