Re: Operf and Xen?

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 06/10/2015 04:50 AM, Janusz Kowal wrote:
> Hello,
> 
> Since profiling with Opcontrol does not work on Xen for me (maybe because Opcontrol is deprecated, maybe for some other reason that nobody seems to know...), I would like to try Operf.
> 
> Can Operf work with Xen at all? 
> 
> My goal is to gather the performance counter data for each virtual machine (domain) passively, i.e. running operf only in the control domain (Dom0) instead of running the profiler inside the guest VMs. Is this possible? If so, how?
> 
> I appreciate any help or hints for further reading.
> 
> Marek
> 

Hi Marek,

oprofile-1.0 removed the opcontrol support and there is some mention in the release notes (http://oprofile.sourceforge.net/release-notes/oprofile-1.0.0) about that and how to get some of the oprofile-1.0.0 support with opcontrol.

I haven't tried xen with oprofile in a long time.  operf is using linux kernel perf infrastructure.  I know that with qemu-kvm one can use perf/operf to monitor a guest vm from the host by attaching to the pid the guest vm is running under.  The main question is does xen dom0 kernel has the needed perf kernel support and is it enabled and I don't know what state that is in for xen.

As a quick check on the xen dom0 you could do something like and see if it returns something reasonable

perf stat ls

If "perf stat ls" works, then chances are "operf -p <pid>" will work for data collection.

-Will

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.