qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 0/2] trace: fix trace_event_get_state() for S


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 0/2] trace: fix trace_event_get_state() for SystemTap and LTTng UST
Date: Tue, 1 Aug 2017 10:38:57 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Mon, Jul 31, 2017 at 03:07:16PM +0100, Stefan Hajnoczi wrote:
> v2:
>  * Don't special-case QEMU dstate [Daniel Berrange]
>  * Use _backends() postfix to clarify function purpose [LluĂ­s]
> 
> Trace events that compute their arguments can affect performance.  The
> following idom can be used to avoid computing arguments when the trace event 
> is
> disabled:
> 
>   if (trace_event_get_state(TRACE_MY_EVENT)) {
>       char *str = g_strdup_printf("Expensive string ...", ...);
>       trace_my_event(str);
>       g_free(str);
>   }
> 
> Unfortunately this breaks the trace event for SystemTap and LTTng UST since
> those tracers manage their own enabled/disabled state.
> 
> These patches add per-backend dstate to trace_event_get_state() so that the
> trace event fires as expected when enabled via SystemTap or LTTng UST.
> 
> Stefan Hajnoczi (2):
>   trace: add TRACE_<event>_BACKEND_DSTATE()
>   trace: add trace_event_get_state_backends()
> 
>  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 ++--
>  scripts/tracetool/__init__.py         |  1 +
>  scripts/tracetool/backend/__init__.py |  3 +++
>  scripts/tracetool/backend/dtrace.py   | 12 ++++++++++++
>  scripts/tracetool/backend/ftrace.py   |  5 +++++
>  scripts/tracetool/backend/log.py      |  5 +++++
>  scripts/tracetool/backend/simple.py   |  5 +++++
>  scripts/tracetool/backend/syslog.py   |  5 +++++
>  scripts/tracetool/backend/ust.py      |  5 +++++
>  scripts/tracetool/format/h.py         | 10 ++++++++++
>  14 files changed, 82 insertions(+), 17 deletions(-)
> 
> -- 
> 2.13.3
> 
> 

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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