From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyi6E-00015p-8H for qemu-devel@nongnu.org; Sun, 22 Jun 2014 09:46:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wyi69-0007H2-G7 for qemu-devel@nongnu.org; Sun, 22 Jun 2014 09:46:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyi69-0007Gr-6n for qemu-devel@nongnu.org; Sun, 22 Jun 2014 09:46:21 -0400 From: Stefan Hajnoczi Date: Sun, 22 Jun 2014 21:46:03 +0800 Message-Id: <1403444767-2601-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 0/4] trace: add simpletrace-stap format to generate binary trace List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: saito.kazuya@jp.fujitsu.com, Stefan Hajnoczi , vilanova@ac.upc.edu v2: * I realized that v1 was not complete enough after feedback from Llu=C3=AD= s and Frank Ch. Eigler, so here is a v2 after all. * Add Makefile target for simpletrace .stp file [Llu=C3=ADs] * Generate SystemTap probe aliases so users can select a subset of probe= s to enable [Frank Ch. Eigler] * Delete --no-header from sys.argv[] so further command-line parsing wor= ks 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 outpu= t data in whatever format is most appropriate. QEMU supports the simpletrace binary format for built-in tracing that com= es with QEMU. Since we need a format for persisting SystemTap traces and a = binary format has performance advantages, let's output simpletrace-compatible da= ta. 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 tr= ace file with simpletrace.py: $ ./configure --enable-trace-backend=3Ddtrace ... && make $ sudo stap x86_64-softmmu/qemu-system-x86_64-simpletrace.stp >trace ...run QEMU in another shell... ^C $ 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 ski= p the simpletrace header check. Stefan Hajnoczi (4): trace: extract stap_escape() function for reuse trace: add tracetool simpletrace_stap format simpletrace: add simpletrace.py --no-header option trace: install simpletrace SystemTap tapset Makefile.target | 10 +++- scripts/simpletrace.py | 24 +++++++--- scripts/tracetool/format/simpletrace_stap.py | 71 ++++++++++++++++++++++= ++++++ scripts/tracetool/format/stap.py | 11 +++-- 4 files changed, 105 insertions(+), 11 deletions(-) create mode 100644 scripts/tracetool/format/simpletrace_stap.py --=20 1.9.3