[ltt-dev] UST use case: Tracing QEMU/KVM
Pierre-Marc Fournier
pierre-marc.fournier at polymtl.ca
Sun May 23 23:57:33 EDT 2010
Hi Stefan,
Thanks for the feedback! A few comments:
----- Original message -----
> Here is feedback from adding UST tracing to QEMU/KVM. Hopefully this
> will be useful to developers and maybe I can learn a more about LTTng
> UST from discussing hurdles I encountered.
>
> The architecture of UST looks good: pure userspace tracing support,
> tracepoints can be enumerated, enabled, and disabled at runtime. The
> manual at http://lttng.org/files/ust/manual/ust.html is a nice
> quickstart although I suspect it only scratches the surface.
If there are specific subjects in mind you feel would benefit from being covered in more depth in the manual, please let me know.
>
> One note about the manual: the TP_PROTO() versus TPPROTO() change was
> confusing. Perhaps a note can be added to the manual that ust.git
> uses TP_PROTO() but libust 0.4 uses TPPROTO()?
This reflects an API change in the kernel. But you are right, this is confusing. I will do a 0.5 release next week, which will obsolete 0.4 and sync the manual.
>
> When running the instrumented binary, the listener thread outputs
> noisy error messages:
> libust[28133/28134]: Error: poll: Interrupted system call (in
> multipoll_poll() at ../libustcomm/multipoll.c:84)
> libust[28133/28134]: Error: error in multipoll_poll (in
> listener_main() at tracectl.c:1015)
>
> Strace shows:
> poll([{fd=3, events=POLLIN}], 1, -1) = ? ERESTART_RESTARTBLOCK (To
> be restarted)
> restart_syscall(<... resuming interrupted call ...>) = ?
> ERESTART_RESTARTBLOCK (To be restarted)
Hmmm. Do you have any pointers to documentation about this return code? I suspect userspace should never see it. Could it be a kernel bug?
>
> Finally, I had to add #undefs to get QEMU to build after including UST
> headers. Unfortunately the UST headers include headers that pollute
> the (macro) namespace.
>
>From examining the patch, I expect you are referring to mutex_lock and _unlock. I just did a commit to fix this.
> Any thoughts on these issues?
>
> My patch enabling UST sent to the QEMU mailing list:
> http://www.mail-archive.com/kvm@vger.kernel.org/msg34830.html
Thanks!
Pierre-Marc
More information about the lttng-dev
mailing list