From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rayson Ho Subject: Re: Tracing KVM with Systemtap Date: Wed, 22 Sep 2010 08:11:30 -0400 Message-ID: <1285157490.6879.23.camel@computer> References: <1283952030.2631.19.camel@computer> <1284988762.2500.13.camel@computer> <1285073887.2566.39.camel@computer> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, systemtap@sources.redhat.com, Prerna Saxena To: Stefan Hajnoczi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34887 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753842Ab0IVMLa (ORCPT ); Wed, 22 Sep 2010 08:11:30 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 2010-09-21 at 14:33 +0100, Stefan Hajnoczi wrote: > > net.c qemu_deliver_packet(), etc - network statistics > > Yes. Further digging into the code in the net/ directory, there are more functions that should be traced/probed - e.g. a lot of the net_socket* routines. Given that SystemTap, LTTng, and DTrace have extremely close to zero overhead at each probe point, adding them into code can provide users different performance resolutions into the networking code. > > /op_helper.c global_cpu_lock(), tlb_fill() - lock & unlock, > > and TLB refill statistics > > These are not relevant to KVM, they are only used when running with > KVM disabled (TCG mode). Hmm, while my main objective is to add probes for KVM, if they are useful to QEMU, I may as well add them to my patch. > > balloon.c, hw/virtio-balloon.c - ballooning information. > > Prerna added a balloon event which is in qemu.git trace-events. Does > that one do what you need? Thanks for the info. > > I will see what other probes are useful for the end users. Also, are > > there developer documentations for KVM? (I googled but found a lot of > > presentations about KVM but not a lot of info about the internals.) > > Not really. I suggest grabbing the source and following vl.c:main() > to the main KVM execution code. I was looking for the hardware interfacing code earlier this morning -- QEMU has the hardware specific directories (e.g. target-i386/ , target-ppc/ ), and I was trying to understand the execution environment when the host and guest are running on the same architecture. I believe cpu_gen_code() and other related functions are what I should dig into... Rayson > > Stefan > -- > 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