[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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
> > 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
> > attractive if we have to parse the strings at run time, though. It
> > easily be fixed by pre-processing all source files with M4 or perl,
> > 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


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.