Hi,

On Sun, Sep 13, 2009 at 8:35 PM, Godmar Back<god...@gmail.com> wrote:
> Date: September 13, 2009
>
> Stephane,
>
> I have a few questions about perfmon2. First off, I apologize for not
> having read the source code; I'm certain that the answers to at least
> some of these questions are contained in it. Still, it may be helpful
> to create a record online to help others better understand where
> perfmon2 stands at this point.
>
> I read your 20-month old presentation at
> http://perfmon2.sourceforge.net/perfmon2-20080124.pdf
>
> Q1: Is there a newer document available that describes perfmon2?
>
No, that is the most recent document. Not much has changed in the
API since then.

> Q2: The presentation states that Perfmon2 is to become "the Linux
> monitoring interface." Has this become true?
>
No. In fact perfmon2 has been rejected in favor of a new API called
perf_counters. This new API is now in 2.6.31 (for X86 only).

> Q3: Just looking at provided functionality, and ignoring support by
> higher-level tools, would perfmon2 have the ability to replace the
> perfctr library and kernel patch?
>
Yes. It does provide the same functionalities.

> Q4: Can perfmon2 replace the Intel Vtune driver, just based on functionality?
>
Both tools use system-wide monitoring. Perfmon2 does provide system-wide
counting and sampling, so I believe with little work support for those tools
would be possible.

> Q5: Does perfmon2 support direct access to virtualized performance
> counter registers in user mode in the manner perfctr does? Slides 16
> and 27 appear to imply that. In perfctr, such access is supported by
> allowing a thread read-only access from user mode to the state
> container structure into which the context switch code saved those
> registers. Does perfmon2 support a similar approach, or do all
> accesses to performance counter registers require a system call?
>
If by virtualized you mean that perfmon2 allows per-thread monitoring,
then the answer is yes. You can attach a monitoring session to a thread.
As the thread is context switched in and out, the monitoring session (PMU
state) is also saved and restored. Counts specific to that thread can be
extracted via a system call. At some point, perfmon2 also had the
ability to read the counts directly from user-space using a remapping
trick. But that was abandoned to simplify the code. But the same trick
perfctr uses could also be used.


> Q6: Slides 32-34 list tools supporting perfmon2. Notably absent are
> the two major vendor tools Intel's VTune and AMD's Code Analyst. The
> former uses their own driver, and the latter relies on perfctr (to my
> knowledge). What is known about support for perfmon2 in these
> products?
>
None do support perfmon2 at this point.

> Q7: The slides discuss that perfmon2 support is slated for inclusion
> into commercial Linux distributions. Are there already any commercial
> Linux distribution that have perfmon2 support in their kernels?  If
> so, which ones?
>
Yes, All Itanium-based distributions includes an earlier version of
perfmon2 called v2.0. I believe SLES11 on x86 may have perfmon2.

> Q8: Slide 6 points out that performance counters may need to be
> accessed in virtualized environments. What support, if any, does
> perfmon2 provide for accessing performance counters as of now?

None at this point unfortunately.

> Specifically, is it possible to use perfmon2 in a Xen/Guest kernel; if
> not, is anybody working on adding such support?  What about KVM?
>
To my knowledge, I don't believe it is possible to transparently  access
the performance counters from within a guest in Xen. I know of XenOprofile
but this is a modified guest. As for KVM, I think the situation is similar.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to