WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Xenoprof: Enabling performance profiling in Xen

To: Andrew Theurer <habanero@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Xenoprof: Enabling performance profiling in Xen
From: Aravind Menon <aravind.menon@xxxxxxx>
Date: Tue, 12 Apr 2005 01:45:16 +0200
Cc: "Turner, Yoshio" <yoshio_turner@xxxxxx>, Xen-devel@xxxxxxxxxxxxxxxxxxx, Bin Ren <bin.ren@xxxxxxxxx>, "Santos, Jose Renato G \(Jose Renato Santos\)" <joserenato.santos@xxxxxx>, G John Janakiraman <john@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 12 Apr 2005 00:31:21 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200504111753.07067.habanero@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <6C21311CEE34E049B74CC0EF339464B902FB3B@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <200504111753.07067.habanero@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> Thanks very much; this will come in very handy.  A few questions:
> 
> 1) When should the --xen option be specified?  My quick testing shows 
> that only when combining with the --start option does opcontrol process 
> the --xen option fully.  For example, running "opcontrol --vmlinux=yyy 
> --xen=zzz; opcontrol --start" does not work, but "opcontrol 
> --vmlinux=xxx; opcontrol --start --xen=zzz" does work for me. 

I'll fix that and send out a patch. Basically, opcontrol saves its
--vmlinux argument in "/root/.oprofile/daemonrc" from where it reads it
back later. Currently, it does not save its --xen argument, so you have
to give it when you actually start profiling, i.e. either with --start
or with --start-daemon. 

> 
> 2) So far I have been able to profile domain0 (running SDET) with 
> nothing else running, but I can't seem to account for another domain 
> running at the same time.  For example, I create a domU (dom id 1) 
> running a cpu bound task, I start oprofile with --passive-domains=1, 
> but I do not get any ticks representing time spent in dom1 (all I want 
> is coarse grain here).  In the sequence of commands to start oprofile, 
> is there a particular invocation of opcontrol to specify the 
> --passive-domains option?  So far I have been doing "oprofile 
> --vmlinux=xxx; oprofile --start --xen=zzz --passive-domains=1"

I think there may be a bug remaining with the user level tools for
passive domains. Just do a dmesg after the profiling session. If the
kernel code is OK, it should print out a line displaying the number of
samples collected for all domains, active and passive. like this

oprofile_arch_init: ret 0, events 8, is_primary 1
pmc: oprofile samples 2727, active 398, passive 2329, other 0, buffering
losses 0, NMI restarted 0


> 3) So far I cannot get an samples in domains other than domain0.  Most 
> likely user error here.  Can a domU be an initiator?  For example, if I 
> have two domains, dom0 and dom1, can dom1 do "everything" while leaving 
> dom0 totally uninvolved?
> 

To get samples at the end of profiling, you have to run opreport in each
of the profiled domains (yuck). This is because we basically run
OProfile in each of the active domains. Right now, I just run a script
which ssh'es to all domains, and collects the profile reports from them.
So, the profile reports you get are per-domain, and you have to
post-process them if you want to get an integrated report.

Currently, any domain can be initiator. (This needs to be changed). So,
you can have a profiling session with only domU leaving out other
domains.  


Regards

Aravind

> Thanks very much!
> 
> -Andrew Theurer


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel