From mboxrd@z Thu Jan 1 00:00:00 1970 From: vilanova@ac.upc.edu (=?utf-8?Q?Llu=C3=ADs_Vilanova?=) Date: Wed, 24 Aug 2016 12:25:54 +0200 Subject: [lttng-dev] [Qemu-devel] [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel In-Reply-To: <20160823155430.GB3948@stefanha-x1.localdomain> (Stefan Hajnoczi's message of "Tue, 23 Aug 2016 11:54:30 -0400") References: <147041636348.2523.2954972609232949598.stgit@fimbulvetr.bsc.es> <20160818105424.GD4850@stefanha-x1.localdomain> <8737lypajh.fsf@fimbulvetr.bsc.es> <20160823155430.GB3948@stefanha-x1.localdomain> Message-ID: <87lgzm4g5p.fsf@fimbulvetr.bsc.es> 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: probe process("./install/vanilla/bin/qemu-system-i386").mark("guest_mem_before_exec") { printf("%p %lx %d\n", $arg1, $arg2, $arg3) } always prints "0x0 0x0 0", which is clearly wrong (other backend on the same build print the correct values). 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). If anybody can shed some like into any of this, I'd appreaciate it. Cheers, Lluis