This patchset enables any domain (Dom0 and/or DomU) on xen-ppc to use the Performance Monitor Extensions of the Power Acrhitecture as known from non virtualized environments e.g. oprofile. It does this by implementing the back end of the H_PERFMON call in xen which is used to enable the Performance Monitor on non virtualized systems. Additionally it implements a perfmon exception handler to catch "postponed" perfmon exceptions from the running domains.

Known Issues of the current implementation (Should be fixed with the following extensions - see below): - While a user can use any known performance monitor counter setup, xen currently does not know how they are used. In the case of "postponed" perfmon exceptions (Domain samples that are reported into xen space) xen has to reset the pmc counters. Xen does not know what special counters are currently set up in the linux guest so it uses the values ones which represent the oprofile default setup. - The results of the postponed performance monitor exceptions are accuracy just ignored which decreases the accuracy dependent on the proportion between valid and postponed exceptions. Short test showed that this issue scales utilization dependent. An idling system had ~10 of 400 postponed exceptions while a heavy utilized system had only 10 of 300000. As there is an application running that is profiled in most scenarios the load and thereby the accuracy should be fair enough for this first implementation step.

If possible the following extensions should take place (Consider this as small plan proposal): - Sampling xen by passing xen samples to a profiling domain (I hope this part can be implemented similar to the xenoprof approach).
- Passing results of postponed perfmon exceptions to the appropriate domain
- Making xen aware of each domains performance monitor counter setup to do reset pmc in a really "valid" way

Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]>

The patches are taken against the tip of Friday 05/04/2007 in and
It was tested in the following scenarios on a JS21:
- profiling on a single Dom0
- profiling on a single Dom0 while DomU's running
- profiling on a single DomU
- profiling on multiple DomU

b/xen/arch/powerpc/papr/h_perfmon.c | 155 +++++++++++++++++++++++++++++
xen/arch/powerpc/domain.c                  |   15 ++
xen/arch/powerpc/exceptions.h              |    1
xen/arch/powerpc/of_handler/papr.S         |    2
xen/arch/powerpc/papr/Makefile             |    1
xen/arch/powerpc/powerpc64/domain.c        |   49 +++++++++
xen/arch/powerpc/powerpc64/exceptions.S    |   26 ++++
xen/include/asm-powerpc/domain.h           |   20 +++
xen/include/asm-powerpc/papr.h             |    1
xen/include/asm-powerpc/powerpc64/config.h |    2
xen/include/asm-powerpc/processor.h        |  137 +++++++++++++++++++++++++
xen/include/asm-powerpc/reg_defs.h         |   28 +++++
xen/include/asm-powerpc/xenoprof.h         |   83 +++++++++++++++
13 files changed, 516 insertions(+), 4 deletions(-)

setup.c |   14 ++++++++++++++
1 files changed, 14 insertions(+)


Grüsse / regards, Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

Xen-ppc-devel mailing list

Reply via email to