From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH] Enhance perf to collect KVM guest os statistics from host side Date: Tue, 23 Mar 2010 15:20:11 +0100 Message-ID: <87vdcnce78.fsf@basil.nowhere.org> References: <1268717232.2813.36.camel@localhost> <1268969929.2813.184.camel@localhost> <20100319082122.GE12576@elte.hu> <20100319172903.GI13108@8bytes.org> <20100321184300.GB25922@elte.hu> <20100322101451.GK13108@8bytes.org> <20100322105927.GB3483@elte.hu> <20100322114744.GC1940@8bytes.org> <878w9jdu7m.fsf@basil.nowhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Joerg Roedel , Ingo Molnar , "Zhang, Yanmin" , Peter Zijlstra , Avi Kivity , Sheng Yang , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Marcelo Tosatti , Jes Sorensen , Gleb Natapov , Zachary Amsden , zhiteng.huang@intel.com, Fr??d??ric Weisbecker , Arnaldo Carvalho de Melo To: Soeren Sandmann Return-path: In-Reply-To: (Soeren Sandmann's message of "23 Mar 2010 15:04:57 +0100") Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Soeren Sandmann writes: > > Examples: > > - What is going on inside QEMU? That's something the JIT interface could answer. > - Which client is the X server servicing? > > - What parts of a python/shell/scheme/javascript program is > taking the most CPU time? I suspect for those you rather need event based tracers of some sort, similar to kernel trace points. Otherwise you would need own separate stacks and other complications. systemtap has some effort to use the dtrace instrumentation that crops up in more and more user programs for this. It wouldn't surprise me if that was already in python and other programs you're interested in. I presume right now it only works if you apply the utrace monstrosity though, but perhaps the new uprobes patches floating around will come to rescue. There also was some effort to have a pure user space daemon based approach for LTT, but I believe that currently needs own trace points. Again I fully expect someone to reinvent the wheel here and afterwards complain about "community inefficiences" :-) > I don't think the oprofile JIT interface solves any of these > problems. (In fact, I don't see why the JIT problem is even hard. The > JIT compiler can just generate a little ELF file with symbols in it, > and the profiler can pick it up through the mmap events that you get > through the perf interface). That would require keeping those temporary ELF files for potentially unlimited time around (profilers today look at the ELF files at the final analysis phase, which might be weeks away) Also that would be a lot of overhead for the JIT and most likely be a larger scale rewrite for a given JIT code base. -Andi -- ak@linux.intel.com -- Speaking for myself only.