On Mon, Jul 31, 2017 at 03:07:18PM +0100, Stefan Hajnoczi wrote:
> 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);
>   }
> 
> Add trace_event_get_state_backends() to fetch backend dstate.  Those
> backends that use QEMU dstate fetch it as part of
> generate_h_backend_dstate().
> 
> Update existing trace_event_get_state() callers to use
> trace_event_get_state_backends() instead.
> 
> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
> ---
> v2:
>  * Use _backends() postfix to clarify function purpose [Lluís]
> ---
>  docs/devel/tracing.txt |  2 +-
>  trace/control.h        | 18 +++++++++++++++++-
>  hw/usb/hcd-ohci.c      | 13 +++++--------
>  net/colo-compare.c     | 11 ++++++-----
>  net/filter-rewriter.c  |  4 ++--
>  5 files changed, 31 insertions(+), 17 deletions(-)

Reviewed-by: Daniel P. Berrange <berra...@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Reply via email to