On Wed, Aug 24, 2016 at 12:25:54PM +0200, Lluís Vilanova wrote: > Stefan Hajnoczi writes: > > > On Sun, Aug 21, 2016 at 02:32:34PM +0200, Lluís Vilanova wrote: > >> Unfortuntely, I've been unable to to make dtrace recognise QEMU's events (I'm > >> only able to see the host kernel events). If someone with more experience on it > >> can help me use dtrace with QEMU's events, I'll also add the supporting library > >> to let dtrace do the callout to QEMU's moitor interface and control the events, > >> and add a prperly useful example of that on the hypertrace docs (which was my > >> original intention). > > > Which "dtrace" and host OS are you using? > > > QEMU builds with static user-space probes. You need to tell DTrace or > > SystemTap to enable those probes in order to record trace data. > > I'm using debian on a 4.6.0-1-amd64 kernel with systemtap 3.0.6. > > I just gave it another try, and works if I use probes like: > > process("").mark("") > > although they don't seem to appear on "stap -l" or anything like that (I cannot > find a "qemu" provider). But I'm still unable to print the event values. This: The following enumerates events for me: $ sudo stap -L 'process("/usr/bin/qemu-system-x86_64").mark("*")' process("/usr/bin/qemu-system-x86_64").mark("alsa_no_frames") $arg1:long process("/usr/bin/qemu-system-x86_64").mark("alsa_pollout") $arg1:long $arg2:long process("/usr/bin/qemu-system-x86_64").mark("alsa_read_zero") $arg1:long ... You can also use /usr/share/systemtap/tapset/qemu-system-x86_64.stp. I'm running Fedora 24 with qemu-system-x86 2.6.0-5.fc24 and SystemTap 3.0-3.fc24. > Also, I'm still not sure how to interact with QEMU's monitor interface from > within the probe code (probes execute in kernel mode, including "guru mode" > code). When SystemTap is used the QEMU monitor interface does nothing. Stefan