This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Qemu tracing
- From: Prerna Saxena <prerna at linux dot vnet dot ibm dot com>
- To: systemtap at sourceware dot org
- Cc: Ananth <ananth at linux dot vnet dot ibm dot com>, Stefan Hajnoczi <stefanha at linux dot vnet dot ibm dot com>, Mahesh Jagannath Salgaonkar <mahesh at linux dot vnet dot ibm dot com>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>
- Date: Tue, 10 Aug 2010 14:31:27 +0530
- Subject: Qemu tracing
Hi all,
Here's an update on a self contained userspace tracer mechanism I've
been working on, for QEMU ; alongwith Stefan Hajnoczi.
As people are aware, QEMU is a Virtual Machine Monitor/Emulator which is
used to run fully virtualised guests using KVM or paravirtualised guests
using Xen across a multitude of host platforms. While the cross platform
capabilities of QEMU make it extremely popular, they put stringent
requirements on the methods that can be employed to trace and profile a
guest run on QEMU. QEMU runs as a userspace application on different
hosts, and each host operating system has its own approaches to tracing
userspace.
To make guest tracing with QEMU truly independent of the host on which
it runs, QEMU must be instrumented by self-contained tracer.
We have devised a static instrumentation framework that allows users to
record binary strings of fixed size into an internal buffer. When full,
the traces are written out to a user-specified file. The trace events
are defined in a text file, and can be toggled on/off via QEMU Monitor
commands( a console interface to QEMU )
When running QEMU on a linux host, one has the choice of using LTTnG as
the supported backend for tracing. In such case, all trace events are
compiled into equivalent LTTnG calls for logging traces. ( This was done
with a view to ensure that a standalone userspace tracing application
may be used as an alternative, if the qemu tracing framework is not to
be used.) Monitor support is currently not available for the same.
It is presently hosted at :
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/tracing ; and
would be posted upstream soon.
This is still in its nascent stages of development, with no optimization
for calls made out for disabled trace events, etc. The performance
penalty needs to get better as well.
It would be nice to get some feedback from tracing gurus here, on how
this can be improved.
Regards,
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India