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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH, RFC] Sparc: convert some debug printf statements to tracepoints
Date: Mon, 11 Oct 2010 10:09:31 +0100

On Sat, Oct 9, 2010 at 8:41 PM, Blue Swirl <address@hidden> wrote:
> 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:
>>>>> 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.

qemu-tool.c stubs out qemu_get_clock() for rt_clock.  This clock only
does millisecond precision whereas trace events should support the
highest precision available.

Keep in mind that common code used by simpletrace.c cannot be easily
traced (infinite recursion).

Still, I think fixing simpletrace clock would be worthwhile.

Stefan



reply via email to

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