qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] simpletrace: Thread-safe tracing


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] simpletrace: Thread-safe tracing
Date: Sun, 27 Feb 2011 17:06:33 +0000

On Sun, Feb 27, 2011 at 4:14 PM, Avi Kivity <address@hidden> wrote:
> On 02/27/2011 04:58 PM, Stefan Hajnoczi wrote:
>>
>> Trace events outside the global mutex cannot be used with the simple
>> trace backend since it is not thread-safe.  There is no check to prevent
>> them being enabled so people sometimes learn this the hard way.
>>
>> This patch restructures the simple trace backend with a ring buffer
>> suitable for multiple concurrent writers.  A writeout thread empties the
>> trace buffer when threshold fill levels are reached.  Should the
>> writeout thread be unable to keep up with trace generation, records will
>> simply be dropped.
>
> It would be good to have an indication of the fact that records were dropped
> in the file.

Good idea.  Trace files begin with a record that has a special ID.
I'll look at extending this either by picking another special ID or by
reusing the header record.

Stefan



reply via email to

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