From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58115 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSQPw-00078Y-WF for qemu-devel@nongnu.org; Sat, 26 Jun 2010 04:07:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSQPv-0003cZ-BI for qemu-devel@nongnu.org; Sat, 26 Jun 2010 04:07:12 -0400 Received: from mtagate5.uk.ibm.com ([194.196.100.165]:44660) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSQPv-0003cJ-39 for qemu-devel@nongnu.org; Sat, 26 Jun 2010 04:07:11 -0400 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate5.uk.ibm.com (8.13.1/8.13.1) with ESMTP id o5Q877ru009835 for ; Sat, 26 Jun 2010 08:07:07 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5Q871M61675360 for ; Sat, 26 Jun 2010 09:07:07 +0100 Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o5Q8703K023290 for ; Sat, 26 Jun 2010 09:07:01 +0100 Date: Sat, 26 Jun 2010 09:06:59 +0100 From: Stefan Hajnoczi Message-ID: <20100626080657.GA4806@stefan-thinkpad.transitives.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] Tracing: outstanding tasks List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: saxena.prerna@in.ibm.com Here are the outstanding tasks for QEMU tracing, which Prerna and I have been working on. Tracing aids debugging, profiling, and observing execution via lightweight logging at key points in the code path. The current prototype is available from the 'tracing' branch at: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/tracing This email is both to help Prerna and me focus our efforts, as well as a roadmap for the QEMU community to discuss and comment on. Here are the outstanding tasks for a tracing patchset that can be proposed for merge: 1. Integration with QMP Owner: Prerna Currently the trace commands are available from the monitor but a QMP interface is needed. 2. More tracepoints need to be added for instrumenting other qemu components such as virtio drivers, etc. Owner: ? QEMU must come with a useful set of trace events that allows people to get up and running quickly. Focus areas include: * guest device emulation * host devices * lifecycle and runloop * memory management * live migration 3. Documentation Owner: Stefan User documentation that explains how to collect traces and add new trace events. I have committed documentation to the tracing branch here: http://repo.or.cz/w/qemu/stefanha.git/blob_plain/91fde34dc6bfe01af6d5e9265f6a81535d6add15:/docs/tracing.txt 4. Fix i386-linux-user build Owner: Prerna LINK i386-linux-user/qemu-i386 ../simpletrace.o: In function `do_info_all_trace_events': /home/stefanha/qemu/simpletrace.c:88: undefined reference to `monitor_printf' ../simpletrace.o: In function `do_info_trace': /home/stefanha/qemu/simpletrace.c:77: undefined reference to `monitor_printf' 5. Out-of-line trace file write-out Owner: Stefan Trace buffers are written out to file synchronously. The vcpu thread should not be blocked so an async write-out mechanism is needed. 6. Trace file command Owner: ? Traces are written out to hardcoded /tmp/trace.log. This must be configurable. Tracing at startup time should still be possible so configuration needs to happen early. 7. Binary trace format finalization Owner: Stefan We should leave room for extension. I suggest partitioning the Event ID namespace into normal events and special events. The __trace_begin special event is defined to contain the file format version and/or trace record size in bytes as the first trace record in the file. This way, post-processing tools can check the format of the binary trace file. 8. QMP/monitor command review Owner: Prerna, Stefan Are we happy to support the trace commands in the longer term (i.e. did we get the commands and syntax right)? Is input being validated properly? Stefan