From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Evans Subject: Re: XENOPROF Problem Date: Thu, 11 Feb 2010 15:39:20 -0800 Message-ID: <4B749528.9060601@yahoo-inc.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0285425878==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ahmad Hassan Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============0285425878== Content-Type: multipart/alternative; boundary="------------010408090501040106050207" This is a multi-part message in MIME format. --------------010408090501040106050207 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Ahmad, I'm certainly not a Xenoprof expert, but I've learned a bit about it by trial and error, with help from the xen-devel list. I've taken the liberty of Cc:ing xen-devel so that others more knowledgeable than me can help you. I haven't tried passive domains yet, and I'll say up front that I don't know why Xenoprof isn't working for you with passive domains= . On 02/11/10 13:37, Ahmad Hassan wrote: > Hi Andrew, > > I need help in using xenoprof. I installed the xenoprof on Dom0 and > DomU as follows: > > * Download Oprofile: > http://prdownloads.sourceforge.net/oprofile/oprofile-0.9.5.tar.gz > * Download XenoProf > patch: http://xenoprof.sourceforge.net/oprofile-0.9.5-xen.patch > * tar =96zxvf oprofile-0.9.5.tar.gz > * cd oprofile-0.9.5 > * patch =96p1 < ../oprofile-0.9.5-xen-rc2.patch ./configure > =96with-kernel-support > * make > * make install > That looks right to me. You also need Xenoprof support in your dom0 kernel. If you're using one of the kernels from the Xen source tree and you can `modprobe oprofile` successfully, you should be ok. > I am interested in measuring profiling overhead in XEN. So which kind > of event should I capture. You want to measure the overhead of the profiler itself? I guess you get that "for free" -- time spent in oprofile kernel code should show up in opreport in dom0, I think. Which performance counter you use depends on what you're trying to measure. If you just want to find out where CPU time is spent, CPU_CLK_UNHALTED should do that for you. That's what I've been doing. > Is it possible to capture all the events? You can specify multiple events, though I haven't tried it. The opreport web page talks about output for multiple events here: http://oprofile.sourceforge.net/doc/opreport.html#opreport-comparison I'd guess you'd just specify --event multiple times when you --start-daem= on. > I followed the following passive profiling approach but I did not > get any data. > > Dom0: opcontrol --reset > Dom1: opcontrol --reset > Dom0: opcontrol --start-daemon --event=3D > CPU_IO_REQUESTS_TO_MEMORY_IO:1000000 --xen=3D/boot/xen-syms-3.4.1 =20 > --vmlinux=3D/boot/vmlinux --passive-domains=3D1 > --passive-images=3D/boot/vmlinux > *At the above command, I get the warning as : > /dev/oprofile/passive-domains Permission Denied* but daemon starts > eventually This is a silly question, but you are running this as root, correct? If you are running as root and getting this error, I think something is wrong either in Xen or your dom0 kernel. `xm dmesg` may have error messages that give clues -- check it before and after starting the daemon= . > Dom0: opcontrol --start > AFTER 30 MINUTE > Dom0: opcontrol =96stop > Dom0: opcontrol --dump > Dom0: opcontrol =96shutdown > > But when I try to "opreport -l" ti says that: "opreport error: No > sample file found: try running opcontrol --dump or specfiy a session > containing sample file" > > > Can you please help me in that? > > Thanks. > > Best Regards, Hassan > http://cern.ch/ahmadh/portfolio > > Erasmus Student > The University of Reading, UK > Aristotle University of Thessaloniki, Greece > The University Of Carlos III, Madrid Spain > > --------------010408090501040106050207 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Ahmad,

I'm certainly not a Xenoprof expert, but I've learned a bit about it by trial and error, with help from the xen-devel list. I've taken the liberty of Cc:ing xen-devel so that others more knowledgeable than me can help you. I haven't tried passive domains yet, and I'll say up front that I don't know why Xenoprof isn't working for you with passive domains.

On 02/11/10 13:37, Ahmad Hassan wrote:
Hi Andrew,

I need help in using xenoprof. I installed the xenoprof on Dom0 and DomU as follows:


That looks right to me. You also need Xenoprof support in your dom0 kernel. If you're using one of the kernels from the Xen source tree and you can `modprobe oprofile` successfully, you should be ok.

I am interested in measuring profiling overhead in XEN. So which kind of event should I capture.

You want to measure the overhead of the profiler itself? I guess you get that "for free" -- time spent in oprofile kernel code should show up in opreport in dom0, I think.

Which performance counter you use depends on what you're trying to measure. If you just want to find out where CPU time is spent, CPU_CLK_UNHALTED should do that for you. That's what I've been doing.

Is it possible to capture all the events?

You can specify multiple events, though I haven't tried it. The opreport web page talks about output for multiple events here:

http://oprofile.sourceforge.net/= doc/opreport.html#opreport-comparison

I'd guess you'd just specify --event multiple times when you --start-daemon.

=A0 I followed the following passive profili= ng approach but I did not get any data.

Dom0: opcontrol --reset
Dom1: opcontrol --reset
Dom0: opcontrol --start-daemon --event=3D CPU_IO_REQUESTS_TO_MEMORY_IO:1000000 --xen=3D/boot/xen-syms-3.4.1=A0=A0 --vmlinux=3D/boot/vmlinux=A0 --passive-domains=3D1 --passive-images=3D/boot/vmlinux
At the above command, I get the warning as : /dev/oprofile/passive-domains Permission Denied but daemon starts eventually

This is a silly question, but you are running this as root, correct? If you are running as root and getting this error, I think something is wrong either in Xen or your dom0 kernel. `xm dmesg` may have error messages that give clues -- check it before and after starting the daemon.

Dom0: opcontrol --start
AFTER 30 MINUTE
Dom0: opcontrol =96stop
Dom0: opcontrol --dump
Dom0: opcontrol =96shutdown

But when I try to "opreport -l" ti says that: "opreport error: No sample file found: try running opcontrol --dump or specfiy a session containing sample file"


Can you please help me in that?

Thanks.

Best Regards, Hassan
http://cern.ch/ahmadh/portfolio

Erasmus Student
The University of Reading, UK
Aristotle University of Thessaloniki, Greece
The University Of Carlos III, Madrid Spain



--------------010408090501040106050207-- --===============0285425878== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0285425878==--