From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Subject: Re: kvmtrace? Date: Thu, 10 Jul 2008 12:01:07 +0200 Message-ID: <200807101201.07795.ehrhardt@linux.vnet.ibm.com> References: <48722309.7020500@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: "Jun Koi" Return-path: Received: from mtagate4.uk.ibm.com ([195.212.29.137]:56596 "EHLO mtagate4.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752751AbYGJKDb convert rfc822-to-8bit (ORCPT ); Thu, 10 Jul 2008 06:03:31 -0400 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate4.uk.ibm.com (8.13.8/8.13.8) with ESMTP id m6AA38pp224838 for ; Thu, 10 Jul 2008 10:03:08 GMT Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m6AA37Ls2523224 for ; Thu, 10 Jul 2008 11:03:08 +0100 Received: from d06av03.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m6AA36T0028893 for ; Thu, 10 Jul 2008 11:03:06 +0100 In-Reply-To: Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Monday 07 July 2008 17:34:13 Jun Koi wrote: > On Mon, Jul 7, 2008 at 11:07 PM, Christian Ehrhardt > > wrote: > > Jun Koi wrote: > >> Hi, > >> > >> Could anybody explain a bit about kvmtrace? I cannot find any doc = on > >> it anywhere. > >> > >> - Is there any short usage instruction for kvmtrace? > > > > I don't know if there is an official doc yet, but you can just star= t with > > the simple version like: > > ./kvmtrace -o outfile -w 5 > > which traces for 5 seconds to outfile.* > > This really surprises me. I expected that we can collect trace for a > specific VM. But it seems that we always trace all the VMs currently > running?? usually you want to trace all to ensure that you can interpret sideeffe= cts. Otherwise you might often urn into wrong interpretation or a good assum= ption=20 and you would "just" need the data for the other guests to ensure your=20 theory. Anyway if you really think we need it you might code it in the probe fu= nction near the head of kvm_add_trace, there is a check for KVM_TRACE_STATE_RU= NNING and there you could easily implement some filter mechanism (you'll want= to=20 extend the ioctls too to get your mask). But anyway, as I mentioned you usually want all data to "be sure" what = you see=20 in your trace. The only scenario where I think we would really need a mask is in very = big=20 many guest scenarios, but today I think no one except the s390 guys hav= e=20 enough guests to have that need practically. > With trace feature always ON, I guess we suffer some overhead, right? > Perhaps the overhead is little, but still we have. If so, is there > anyway to turn the trace feature OFF? Well, you can turn it off permanent by disabling CONFIG_KVM_TRACE. But be aware that kvm_trace uses the markers infrastructure (see=20 Documentation/markers.txt) which means that the overhead is really real= ly low=20 as long as you don't actively use kvmtrace (invoked via the userspace t= ool). And if you use it, well then it should do something ;-) > Many thanks, > Jun > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization