From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S78EU-0001Zp-ME for qemu-devel@nongnu.org; Mon, 12 Mar 2012 12:36:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S78EN-0002jU-7H for qemu-devel@nongnu.org; Mon, 12 Mar 2012 12:36:26 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:35350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S78EM-0002ib-Uj for qemu-devel@nongnu.org; Mon, 12 Mar 2012 12:36:19 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Mar 2012 16:36:14 -0000 Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2CGaCbU2216024 for ; Mon, 12 Mar 2012 16:36:12 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2CGaCLq023778 for ; Mon, 12 Mar 2012 10:36:12 -0600 Date: Mon, 12 Mar 2012 14:48:31 +0000 From: Stefan Hajnoczi Message-ID: <20120312144831.GA32737@stefanha-thinkpad.localdomain> References: <1331302420-29737-1-git-send-email-stefanha@linux.vnet.ibm.com> <4F5DE72A.1000103@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F5DE72A.1000103@redhat.com> Subject: Re: [Qemu-devel] [PATCH] kvm: add flightrecorder script List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org On Mon, Mar 12, 2012 at 02:08:10PM +0200, Avi Kivity wrote: > On 03/09/2012 04:13 PM, Stefan Hajnoczi wrote: > > The kvm kernel module includes a number of trace events which can be > > useful when debugging system behavior. Even on production systems these > > trace events can be used to observe guest behavior and identify the > > source of problems. > > > > The kvm_flightrecorder script is a command-line wrapper for the > > /sys/kernel/debug/tracing interface. Kernel symbols do not need to be > > installed. > > > > This script captures a fixed-size buffer of KVM trace events. Recent > > events overwrite the oldest events when the buffer size is exceeded and > > it is possible to leave KVM tracing enabled for any period of time with > > just a fixed-size buffer. If the buffer is large enough this script is > > a useful tool for collecting detailed information after an issue occurs > > with a guest. Hence the name "flight recorder". > > > > The script can also be used in 'tail' mode to simply view KVM trace > > events as they occur. This is handy for development and to ensure that > > the guest is indeed running. > > > > > > Have you considered updating trace-cmd or perf-something instead? While > each of these tools are useful we miss out on combining capabilities. > For example you could 'perf probe' a dynamic tracepoint and flightrecord > it together with kvm tracepoints. This script is ideal in situations where you want to ask someone who is not a developer to collect information. They sometimes don't want to install software but running a small Python script is okay. So that's the background of this tool. That said, I agree that integrating flightrecorder mode into perf would be very nice. I'm not sure I'll be able to come up with patches soon but if someone is interested in doing this that would be fantastic. Stefan