On Sun, Feb 27, 2011 at 4:14 PM, Avi Kivity <a...@redhat.com> 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