Am 09.10.2010 um 18:00 schrieb Andreas Färber:
Am 09.10.2010 um 17:46 schrieb Blue Swirl:
On Sat, Oct 9, 2010 at 3:35 PM, Andreas Färber <andreas.faer...@web.de
> wrote:
Am 09.10.2010 um 17:10 schrieb Blue Swirl:
Replace some debug printf statements with tracepoints.
Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
I think tracing way is more flexible than current conditional
code. I
remember wading through hundreds of megs of DPRINTF output
looking for
a clue about a specific event, so being able to control the trace
dynamically is invaluable.
While this may in theory be right, in practice the nop backend
gives us
nothing and the simple trace backend still has porting issues that
need to
be fixed.
Which issues, do you mean that Python isn't available for all
platforms?
Python is installable on Win32, I'm talking about build failures,
I'll check later.
I remember hacking around some time-related problems on Haiku (it
was using
an optional POSIX feature without check/wrapper), and there was a
comment
saying that similar changes need to be done for Win32 support too.
On Mac OS X v10.5 I do get the same error as on Haiku:
CC simpletrace.o
/Users/andreas/QEMU/qemu/simpletrace.c: In function ‘trace’:
/Users/andreas/QEMU/qemu/simpletrace.c:149: warning: implicit
declaration of function ‘clock_gettime’
/Users/andreas/QEMU/qemu/simpletrace.c:149: warning: nested extern
declaration of ‘clock_gettime’
/Users/andreas/QEMU/qemu/simpletrace.c:149: error: ‘CLOCK_MONOTONIC’
undeclared (first use in this function)
/Users/andreas/QEMU/qemu/simpletrace.c:149: error: (Each undeclared
identifier is reported only once
/Users/andreas/QEMU/qemu/simpletrace.c:149: error: for each function
it appears in.)
make: *** [simpletrace.o] Error 1
There are problems #including "trace.h" from op_helper.c
(qemu-common.h conflicts with dyngen-exec.h), otherwise this looks
promising.
According to the comment in simpletrace.c, it is caused by the same
observation you made wrt header incompatibilities.
Maybe Stefan's dyngen cleanup patch helps with the header issue? Still
need to test...
On Haiku I had used some BeOS time function instead at the time. The
Haiku/ppc guest hangs qemu-system-ppc though and no {malloc,realloc}
was traced (which it did via manual printf), so I'm unsure whether the
log is just not being flushed or whether something else is not working.
Cheers,
Andreas