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