qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Tracing patches
@ 2014-11-18 15:04 Stefan Hajnoczi
  2014-11-18 15:04 ` [Qemu-devel] [PULL 1/2] Tracing docs fix configure option and description Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-11-18 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Stefan Hajnoczi

The following changes since commit 1aba4be97eb01b650d146c7f01dc961d55da62ab:

  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-11-17 17:22:03 +0000)

are available in the git repository at:

  git://github.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to 776ec96f790e2c943c13313d8ecab4713b47ab65:

  Tracing: Fix simpletrace.py error on tcg enabled binary traces (2014-11-18 14:05:58 +0000)

----------------------------------------------------------------

----------------------------------------------------------------

Christoph Seifert (1):
  Tracing: Fix simpletrace.py error on tcg enabled binary traces

Dr. David Alan Gilbert (1):
  Tracing docs fix configure option and description

 docs/tracing.txt              |  6 ++--
 scripts/tracetool/__init__.py | 67 +++++++++++++++++++++----------------------
 2 files changed, 36 insertions(+), 37 deletions(-)

-- 
2.1.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 1/2] Tracing docs fix configure option and description
  2014-11-18 15:04 [Qemu-devel] [PULL 0/2] Tracing patches Stefan Hajnoczi
@ 2014-11-18 15:04 ` Stefan Hajnoczi
  2014-11-18 15:04 ` [Qemu-devel] [PULL 2/2] Tracing: Fix simpletrace.py error on tcg enabled binary traces Stefan Hajnoczi
  2014-11-18 16:17 ` [Qemu-devel] [PULL 0/2] Tracing patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-11-18 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Dr. David Alan Gilbert, Stefan Hajnoczi

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Fix the example trace configure option.
Update the text to say that multiple backends are allowed and what
happens when multiple backends are enabled.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: 1412691161-31785-1-git-send-email-dgilbert@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 docs/tracing.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/tracing.txt b/docs/tracing.txt
index 7d38926..7117c5e 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -139,12 +139,12 @@ events are not tightly coupled to a specific trace backend, such as LTTng or
 SystemTap.  Support for trace backends can be added by extending the "tracetool"
 script.
 
-The trace backend is chosen at configure time and only one trace backend can
-be built into the binary:
+The trace backends are chosen at configure time:
 
-    ./configure --trace-backends=simple
+    ./configure --enable-trace-backends=simple
 
 For a list of supported trace backends, try ./configure --help or see below.
+If multiple backends are enabled, the trace is sent to them all.
 
 The following subsections describe the supported trace backends.
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PULL 2/2] Tracing: Fix simpletrace.py error on tcg enabled binary traces
  2014-11-18 15:04 [Qemu-devel] [PULL 0/2] Tracing patches Stefan Hajnoczi
  2014-11-18 15:04 ` [Qemu-devel] [PULL 1/2] Tracing docs fix configure option and description Stefan Hajnoczi
@ 2014-11-18 15:04 ` Stefan Hajnoczi
  2014-11-18 16:17 ` [Qemu-devel] [PULL 0/2] Tracing patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-11-18 15:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Christoph Seifert, Stefan Hajnoczi

From: Christoph Seifert <christoph.seifert@posteo.de>

simpletrace.py does not recognize the tcg option while reading trace-events  file. In result simpletrace does not work on binary traces and tcg enabled events. Moved transformation of tcg enabled events to _read_events() which is used by simpletrace.

Signed-off-by: Christoph Seifert <christoph.seifert@posteo.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 scripts/tracetool/__init__.py | 67 +++++++++++++++++++++----------------------
 1 file changed, 33 insertions(+), 34 deletions(-)

diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 3d5743f..181675f 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -253,14 +253,44 @@ class Event(object):
 
 
 def _read_events(fobj):
-    res = []
+    events = []
     for line in fobj:
         if not line.strip():
             continue
         if line.lstrip().startswith('#'):
             continue
-        res.append(Event.build(line))
-    return res
+
+        event = Event.build(line)
+
+        # transform TCG-enabled events
+        if "tcg" not in event.properties:
+            events.append(event)
+        else:
+            event_trans = event.copy()
+            event_trans.name += "_trans"
+            event_trans.properties += ["tcg-trans"]
+            event_trans.fmt = event.fmt[0]
+            args_trans = []
+            for atrans, aorig in zip(
+                    event_trans.transform(tracetool.transform.TCG_2_HOST).args,
+                    event.args):
+                if atrans == aorig:
+                    args_trans.append(atrans)
+            event_trans.args = Arguments(args_trans)
+            event_trans = event_trans.copy()
+
+            event_exec = event.copy()
+            event_exec.name += "_exec"
+            event_exec.properties += ["tcg-exec"]
+            event_exec.fmt = event.fmt[1]
+            event_exec = event_exec.transform(tracetool.transform.TCG_2_HOST)
+
+            new_event = [event_trans, event_exec]
+            event.event_trans, event.event_exec = new_event
+
+            events.extend(new_event)
+
+    return events
 
 
 class TracetoolError (Exception):
@@ -333,35 +363,4 @@ def generate(fevents, format, backends,
 
     events = _read_events(fevents)
 
-    # transform TCG-enabled events
-    new_events = []
-    for event in events:
-        if "tcg" not in event.properties:
-            new_events.append(event)
-        else:
-            event_trans = event.copy()
-            event_trans.name += "_trans"
-            event_trans.properties += ["tcg-trans"]
-            event_trans.fmt = event.fmt[0]
-            args_trans = []
-            for atrans, aorig in zip(
-                    event_trans.transform(tracetool.transform.TCG_2_HOST).args,
-                    event.args):
-                if atrans == aorig:
-                    args_trans.append(atrans)
-            event_trans.args = Arguments(args_trans)
-            event_trans = event_trans.copy()
-
-            event_exec = event.copy()
-            event_exec.name += "_exec"
-            event_exec.properties += ["tcg-exec"]
-            event_exec.fmt = event.fmt[1]
-            event_exec = event_exec.transform(tracetool.transform.TCG_2_HOST)
-
-            new_event = [event_trans, event_exec]
-            event.event_trans, event.event_exec = new_event
-
-            new_events.extend(new_event)
-    events = new_events
-
     tracetool.format.generate(events, format, backend)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PULL 0/2] Tracing patches
  2014-11-18 15:04 [Qemu-devel] [PULL 0/2] Tracing patches Stefan Hajnoczi
  2014-11-18 15:04 ` [Qemu-devel] [PULL 1/2] Tracing docs fix configure option and description Stefan Hajnoczi
  2014-11-18 15:04 ` [Qemu-devel] [PULL 2/2] Tracing: Fix simpletrace.py error on tcg enabled binary traces Stefan Hajnoczi
@ 2014-11-18 16:17 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2014-11-18 16:17 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 18 November 2014 15:04, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> The following changes since commit 1aba4be97eb01b650d146c7f01dc961d55da62ab:
>
>   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2014-11-17 17:22:03 +0000)
>
> are available in the git repository at:
>
>   git://github.com/stefanha/qemu.git tags/tracing-pull-request
>
> for you to fetch changes up to 776ec96f790e2c943c13313d8ecab4713b47ab65:
>
>   Tracing: Fix simpletrace.py error on tcg enabled binary traces (2014-11-18 14:05:58 +0000)
>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-18 16:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 15:04 [Qemu-devel] [PULL 0/2] Tracing patches Stefan Hajnoczi
2014-11-18 15:04 ` [Qemu-devel] [PULL 1/2] Tracing docs fix configure option and description Stefan Hajnoczi
2014-11-18 15:04 ` [Qemu-devel] [PULL 2/2] Tracing: Fix simpletrace.py error on tcg enabled binary traces Stefan Hajnoczi
2014-11-18 16:17 ` [Qemu-devel] [PULL 0/2] Tracing patches Peter Maydell

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).