From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22791 invoked by alias); 10 Oct 2011 09:10:53 -0000 Received: (qmail 22783 invoked by uid 22791); 10 Oct 2011 09:10:51 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_QE X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Oct 2011 09:10:31 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9A9AV8G002434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Oct 2011 05:10:31 -0400 Received: from localhost (vpn1-4-177.ams2.redhat.com [10.36.4.177]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9A9AUii028568 for ; Mon, 10 Oct 2011 05:10:30 -0400 Date: Mon, 10 Oct 2011 09:10:00 -0000 From: "Richard W.M. Jones" To: systemtap@sources.redhat.com Subject: Systemtap + tracing processes inside a qemu guest Message-ID: <20111010091026.GA15664@amd.home.annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00030.txt.bz2 I have a program (libguestfs) where the architecture is something like this: +--------------+ +----------------------------+ | program on | | +-----------------+ | | host <--------------> daemon in guest | | | | socket | +-----------------+ | +--------------+ | qemu | +----------------------------+ I've instrumented the host program with DTRACE macros according to [1] and that works well. However to get the complete picture I'd like to instrument the daemon too. The aim would be to get timing information across both the host program and the daemon: 0.001s program event #1 send message 0.005s daemon event #1 receive message 0.010s daemon event #2 send reply 0.025s program event #2 receive reply (Note: I'm not interested in the qemu process itself, only in kernel + userspace programs running inside the qemu virtual machine.) What's possible at the moment? I've read 'stapsh.c' and bug 13078 [2]. I'm not clear how to put it all together, or even if this is possible right now. Rich. [1] http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps [2] http://sourceware.org/bugzilla/show_bug.cgi?id=13078 -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/