|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sizedfieldsfor
> 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
|
|
|
|
|