qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/2] trace: add trace_event_get_state_backend


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH v2 2/2] trace: add trace_event_get_state_backends()
Date: Mon, 31 Jul 2017 20:39:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Stefan Hajnoczi writes:

> On Mon, Jul 31, 2017 at 06:09:56PM +0300, Lluís Vilanova wrote:
>> Stefan Hajnoczi writes:
>> 
>> > Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so
>> > the following trace event will not fire when solely enabled by SystemTap
>> > or LTTng UST:
>> 
>> >   if (trace_event_get_state(TRACE_MY_EVENT)) {
>> >       str = g_strdup_printf("Expensive string to generate ...",
>> >                             ...);
>> >       trace_my_event(str);
>> >       g_free(str);
>> >   }
>> 
>> I believe this should be trace_event_get_state_backends(). Same applies to 
>> the
>> cover letter.

> This instance and the cover letter are both showing the pattern in
> existing code.

> The description "event will not fire" is correct with
> trace_event_get_state().  If I change it to
> trace_event_get_state_backends() then the description is no longer
> correct :).

Woops, I read this too quickly and assumed it was a usage example, sorry :)

Cheers,
  Lluis



reply via email to

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