[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: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] trace: add trace_event_get_state_backends() |
Date: |
Mon, 31 Jul 2017 17:33:53 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
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 :).
Stefan
signature.asc
Description: PGP signature