From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHQl-0007QC-2N for qemu-devel@nongnu.org; Mon, 09 Jan 2012 10:46:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RkHQf-0007Gd-JB for qemu-devel@nongnu.org; Mon, 09 Jan 2012 10:46:39 -0500 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:33635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RkHQe-0007G0-KM for qemu-devel@nongnu.org; Mon, 09 Jan 2012 10:46:33 -0500 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Jan 2012 21:16:27 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q09FkMFf3428364 for ; Mon, 9 Jan 2012 21:16:22 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q09FkLCt028290 for ; Tue, 10 Jan 2012 02:46:22 +1100 From: Harsh Prateek Bora Date: Mon, 9 Jan 2012 21:16:16 +0530 Message-Id: <1326123980-6038-1-git-send-email-harsh@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v2 0/4] simpletrace : support var num of args and strings. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aneesh.kumar@linux.vnet.ibm.com, mathieu.desnoyers@efficios.com, vilanova@ac.upc.edu, stefanha@linux.vnet.ibm.com Existing simple trace can log upto 6 args per trace event and does not support strings in trace record format. Introducing new trace format as discussed earlier on list to support variable number/size of arguments. (Ref: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg03426.html) Basic testing of this patch is successful. Stress testing not yet done. Apply patches, then run: make distclean ./configure with --enable-trace-backend=simple make sudo make install Sample tracelog showing strings support: [harsh@harshbora v9fs]$ scripts/simpletrace.py trace-events trace-23261 v9fs_version 0.000 tag=65535 id=100 msize=8192 version=9P2000.L v9fs_version_return 17.530 tag=65535 id=100 msize=8192 version=9P2000.L v9fs_attach 180.121 tag=1 id=104 fid=0 afid=18446744073709551615 uname=nobody aname= Note: LTTng ust backend is broken in upstream qemu, therefore tracetool.py doesnt support ust backend as of now. IIUC, ust's trace event APIs are under development and not yet stable. Version History: v2: - Updated tracetool.py to support nop, stderr, dtrace backend v1: - Working protoype with tracetool.py converted only for simpletrace backend Harsh Prateek Bora (4): Converting tracetool.sh to tracetool.py Makefile and configure changes for tracetool.py simpletrace-v2: Handle variable number/size of elements per trace record. simpletrace.py: updated log reader script to handle new log format Makefile.objs | 6 +- Makefile.target | 10 +- configure | 4 +- monitor.c | 2 +- scripts/simpletrace.py | 110 ++++++++++- scripts/tracetool.py | 505 ++++++++++++++++++++++++++++++++++++++++++++++++ trace/simple.c | 178 ++++++----------- trace/simple.h | 31 +++- 8 files changed, 702 insertions(+), 144 deletions(-) create mode 100755 scripts/tracetool.py