qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v1 8/9] util/qemu-thread-*: add qemu_lock, l


From: Alex Bennée
Subject: Re: [Qemu-devel] [RFC PATCH v1 8/9] util/qemu-thread-*: add qemu_lock, locked and unlock trace events
Date: Tue, 09 May 2017 14:50:04 +0100
User-agent: mu4e 0.9.19; emacs 25.2.17

Stefan Hajnoczi <address@hidden> writes:

> On Fri, May 05, 2017 at 04:59:58PM +0100, Alex Bennée wrote:
>>
>> Paolo Bonzini <address@hidden> writes:
>>
>> > On 05/05/2017 12:38, Alex Bennée wrote:
>> >> Signed-off-by: Alex Bennée <address@hidden>
>> >
>> > Can you look at the patch I just sent a pull request for?  It only has
>> > locked and unlocked trace events, you can add lock on top.
>>
>> Cool - great minds think alike ;-)
>>
>> I'll re-spin my trace analysis script and the lock trace point once that
>> pull request is merged. I would be nice if we could associate locks with
>> names though as the QemuMutex * is basically just an anonymous handle.
>> Would it be overly extravagant to add a const char * to QemuMutex to can
>> be init'ed with a human readable name?
>>
>> Stefan,
>>
>> Does the trace sub-system have any way to register a human readable
>> string to a given pointer value? I guess this is something that could be
>> added to the trace pre-amble?
>
> No, it doesn't.  I would make the trace event take const char * and pass
> in the string.

It would be nice to avoid having the string for non-trace builds. I was
thinking of something like:

  trace_register_human_name(void *ptr, const char *name)

Which compiles away to nothing when tracing is not enabled.

>
> Stefan


--
Alex Bennée



reply via email to

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