[Top][All Lists]

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

[Qemu-devel] [PATCH 0/3] trace: add simpletrace-stap format to generate

From: Stefan Hajnoczi
Subject: [Qemu-devel] [PATCH 0/3] trace: add simpletrace-stap format to generate binary trace
Date: Tue, 27 May 2014 14:35:56 +0200

SystemTap is a popular tracing solution on Fedora and RHEL.  It does not have
its own trace file format, instead stap scripts have the freedom to output data
in whatever format is most appropriate.

QEMU supports the simpletrace binary format for built-in tracing that comes
with QEMU.  Since we need a format for persisting SystemTap traces and a binary
format has performance advantages, let's output simpletrace-compatible data.

This patch adds a new stap file that is autogenerated from trace-events.  The
following example shows how to use SystemTap and analyze the resulting trace
file with simpletrace.py:

  $ ./configure --enable-trace-backend=dtrace ... && make
  $ sudo stap x86_64-softmmu/qemu-system-x86_64-simpletrace.stp >trace
  ...run QEMU in another shell...
  $ scripts/simpletrace.py --no-header trace-events trace

One new concept here is the simpletrace.py --no-header option.  SystemTap
supports flight-recorder mode where trace records are written into a ring
buffer.  The ring buffer can be dumped at any time so it is useful to skip the
simpletrace header check.

Stefan Hajnoczi (3):
  trace: extract stap_escape() function for reuse
  trace: add tracetool simpletrace_stap format
  simpletrace: add simpletrace.py --no-header option

 scripts/simpletrace.py                       | 23 ++++++---
 scripts/tracetool/format/simpletrace_stap.py | 73 ++++++++++++++++++++++++++++
 scripts/tracetool/format/stap.py             | 11 +++--
 3 files changed, 97 insertions(+), 10 deletions(-)
 create mode 100644 scripts/tracetool/format/simpletrace_stap.py


reply via email to

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