From 74dbb25f6756bceced459c3fefbdbc678739004a Mon Sep 17 00:00:00 2001 From: Aurelien Reynaud Date: Thu, 14 Oct 2010 22:09:27 +0200 Subject: [PATCH] lpar plugin: check for donation support in libperfstat Signed-off-by: Aurelien Reynaud Signed-off-by: Florian Forster --- configure.in | 6 ++++++ src/lpar.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/configure.in b/configure.in index fcbd57c0..5abca73a 100644 --- a/configure.in +++ b/configure.in @@ -1193,6 +1193,12 @@ fi if test "x$with_perfstat" = "xyes" then AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)]) + # struct members pertaining to donation have been added to libperfstat somewhere between AIX5.3ML5 and AIX5.3ML9 + AC_CHECK_MEMBER([perfstat_partition_type_t.b.donate_enabled], [], [], [[#include ticks given to another partition @@ -224,6 +229,7 @@ static int lpar_read (void) /* Donated ticks will be accounted for as stolen ticks in other LPARs */ consumed_ticks += idle_stolen_ticks + busy_stolen_ticks; } +#endif lpar_submit ("consumed", (double) consumed_ticks / (double) ticks); -- 2.11.0