Received: from [140.186.70.92] (port=60439 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVpAl-0004Gx-7M for qemu-devel@nongnu.org; Mon, 05 Jul 2010 13:09:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVpAj-00010j-Mn for qemu-devel@nongnu.org; Mon, 05 Jul 2010 13:09:35 -0400 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:37023) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVpAj-0000zS-5C for qemu-devel@nongnu.org; Mon, 05 Jul 2010 13:09:33 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp08.au.ibm.com (8.14.4/8.13.1) with ESMTP id o65H9M56030062 for ; Tue, 6 Jul 2010 03:09:22 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o65H9NPc1630296 for ; Tue, 6 Jul 2010 03:09:24 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o65H9Nkx005182 for ; Tue, 6 Jul 2010 03:09:23 +1000 Date: Mon, 5 Jul 2010 22:39:19 +0530 From: Sripathi Kodi Message-ID: <20100705223919.324fdf4a@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Reg. trace infrastructure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Prerna Saxena Cc: "qemu-devel@nongnu.org" Hi Stefan, Prerna, I pulled down QEMU tracing code from git://repo.or.cz/qemu/stefanha.git and tried to use it to trace something in virtio-9p code. I don't have any knowledge of how traces are implemented and I just went with the documentation. With help from Prerna, I was able to insert a trace point and observe it getting hit from the QEMU monitor. However, I have a few questions about this. Could you please help me out? *) My understanding is the traces are dumped to a file only when the trace buffer gets filled. Is there a way to: a) Forcibly dump the contents of the buffer when needed. b) When QEMU exits it should dump the buffer. Doesn't seem to be doing this now. c) A way to specify the file into which it writes the traces. *) Is QEMU monitor the only way to enable/disable trace points? Is it possible to programmatically enable/disable trace points from within QEMU code? If that is not possible, is it possible to specify all trace points to be enabled in a text file and ask QEMU to read the file when it starts up? *) Is it possible to enable/disable a bunch of trace points at one shot? Can trace points be grouped in some way? Can I say "enable all trace points in a particular .c file" or "enable all trace points in these 2 functions"? Thanks a lot for your help. -Sripathi.