From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, "Denis V. Lunev" <den@openvz.org>,
"Lluís Vilanova" <vilanova@ac.upc.edu>
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 [thread overview]
Message-ID: <20170801093857.GC13521@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170731140718.22010-1-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
prev parent reply other threads:[~2017-08-01 9:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 14:07 [Qemu-devel] [PATCH v2 0/2] trace: fix trace_event_get_state() for SystemTap and LTTng UST Stefan Hajnoczi
2017-07-31 14:07 ` [Qemu-devel] [PATCH v2 1/2] trace: add TRACE_<event>_BACKEND_DSTATE() Stefan Hajnoczi
2017-07-31 15:16 ` Daniel P. Berrange
2017-07-31 16:35 ` Stefan Hajnoczi
2017-08-01 9:23 ` Daniel P. Berrange
2017-07-31 14:07 ` [Qemu-devel] [PATCH v2 2/2] trace: add trace_event_get_state_backends() Stefan Hajnoczi
2017-07-31 15:09 ` Lluís Vilanova
2017-07-31 16:33 ` Stefan Hajnoczi
2017-07-31 17:39 ` Lluís Vilanova
2017-08-01 9:27 ` Daniel P. Berrange
2017-08-01 9:38 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170801093857.GC13521@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=den@openvz.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).