[ltt-dev] [RELEASE] LTTng-UST 0.15 (Qemu support & tutorial)
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Fri Jul 15 15:04:25 EDT 2011
LTTng-UST, the Linux Trace Toolkit Next Generation Userspace Tracer, is
port of the low-overhead tracing capabilities of the LTTng kernel tracer
to user-space. The library "libust" enables tracing of applications and
libraries.
Changelog:
* Add backward compability for tracepoint API (still planned
for deprecation, but should make the transition smoother).
The API transition will happen when UST 2.0 is ready. There is no
point in making multiple API breakage when unneeded.
tracing qemu-kvm with UST is now working again with UST 0.15 (0.14 did
break it).
Project website: http://lttng.org/ust/
Download link: http://lttng.org/files/ust/releases/
(please refer to the UST Manual for installation instructions)
A quick walkthrough for tracing kvm-qemu with UST:
git clone git://git.lttng.org/userspace-rcu.git
(install: see README)
git clone git://git.lttng.org/ust.git
(install: see README)
In my case, I enabled qemu_malloc, qemu_realloc, qemu_free,
qemu_memalign, qemu_vmalloc, qemu_vfree by editing the "trace-events"
file in the toplevel source directory (this file is qemu-specific, not
the usual interface UST provides):
# qemu-malloc.c
qemu_malloc(size_t size, void *ptr) "size %zu ptr %p"
qemu_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
qemu_free(void *ptr) "ptr %p"
# osdep.c
qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
qemu_vmalloc(size_t size, void *ptr) "size %zu ptr %p"
qemu_vfree(void *ptr) "ptr %p"
./configure --enable-trace-backend=ust
make
ldd x86_64-softmmu/qemu-system-x86_64
...
libust.so.0 => /usr/local/lib/libust.so.0 (0x00007fa39fc74000)
(it's linked with libust)
usttrace x86_64-softmmu/qemu-system-x86_64
...
stop it (ctrl-c)
See resulting trace in:
$HOME/.usttraces/hostname-timestamp
UST 0.15 traces can be viewed with lttv: git clone git://git.lttng.org/lttv.git
(install: view README)
To view the trace (e.g.):
% lttv -m textDump -t % /home/compudj/.usttraces/ok-20110715144748823020811/32575_5629652727107472206
...
ust.qemu_free: 1552840.525993542 (/home/compudj/.usttraces/ok-20110715144748823020811/32575_5629652727107472206/ust_6), 0, 0, , , 0, 0x0, MODE_UNKNOWN { ptr = 0x1187680 }
ust.qemu_free: 1552840.525994061 (/home/compudj/.usttraces/ok-20110715144748823020811/32575_5629652727107472206/ust_6), 0, 0, , , 0, 0x0, MODE_UNKNOWN { ptr = 0x1187660 }
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list