qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH, RFC] Sparc: convert some debug printf statement


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH, RFC] Sparc: convert some debug printf statements to tracepoints
Date: Sat, 9 Oct 2010 19:41:47 +0000

On Sat, Oct 9, 2010 at 6:33 PM, Andreas Färber <address@hidden> wrote:
> 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 <address@hidden>
>>> wrote:
>>>>
>>>> Am 09.10.2010 um 17:10 schrieb Blue Swirl:
>>>>
>>>>> Replace some debug printf statements with tracepoints.
>>>>>
>>>>> Signed-off-by: Blue Swirl <address@hidden>
>>>>> ---
>>>>> 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

Simpletrace should use qemu-timer, which should be made available to
tools etc. Alternatively, perhaps the real time difference is not so
interesting, so we could fake it with a counter if clocks are not
available.

>>>>> 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.

I also didn't get anything logged at first because trace.h contained
the nop versions (also I tried to enable an event by numeric ID, which
doesn't work, but there was also no error message). Maybe the Makefile
dependencies are not correct.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]