Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   xen: Get idle data from alternative source (http://www.linux-archive.org/crash-utility/680431-xen-get-idle-data-alternative-source.html)

Daniel Kiper 07-05-2012 03:03 PM

xen: Get idle data from alternative source
 
idle member was removed from struct schedule_data by 21422 changeset
(Fix CPU hotplug after percpu data handling changes). Get idle data
from alternative source.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>

diff -Npru crash-6.0.8.orig/xen_hyper.c crash-6.0.8/xen_hyper.c
--- crash-6.0.8.orig/xen_hyper.c 2012-07-05 16:05:31.000000000 +0200
+++ crash-6.0.8/xen_hyper.c 2012-07-05 16:08:52.000000000 +0200
@@ -397,7 +397,8 @@ xen_hyper_misc_init(void)
XEN_HYPER_STRUCT_SIZE_INIT(schedule_data, "schedule_data");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_schedul e_lock, "schedule_data", "schedule_lock");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_curr, "schedule_data", "curr");
- XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_idle, "schedule_data", "idle");
+ if (MEMBER_EXISTS("schedule_data", "idle"))
+ XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_idle, "schedule_data", "idle");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_sched_p riv, "schedule_data", "sched_priv");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_s_timer , "schedule_data", "s_timer");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_tick, "schedule_data", "tick");
@@ -539,7 +540,10 @@ xen_hyper_schedule_init(void)
}
schc->cpu_id = cpuid;
schc->curr = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_curr));
- schc->idle = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_idle));
+ if (MEMBER_EXISTS("schedule_data", "idle"))
+ schc->idle = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_idle));
+ else
+ schc->idle = xht->idle_vcpu_array[cpuid];
schc->sched_priv =
ULONG(buf + XEN_HYPER_OFFSET(schedule_data_sched_priv));
if (XEN_HYPER_VALID_MEMBER(schedule_data_tick))

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Daniel Kiper 08-10-2012 01:27 PM

xen: Get idle data from alternative source
 
idle member was removed from struct schedule_data by 21422 changeset
(Fix CPU hotplug after percpu data handling changes). Get idle data
from alternative source.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>

diff -Npru crash-6.0.8.orig/xen_hyper.c crash-6.0.8/xen_hyper.c
--- crash-6.0.8.orig/xen_hyper.c 2012-07-05 16:05:31.000000000 +0200
+++ crash-6.0.8/xen_hyper.c 2012-07-05 16:08:52.000000000 +0200
@@ -397,7 +397,8 @@ xen_hyper_misc_init(void)
XEN_HYPER_STRUCT_SIZE_INIT(schedule_data, "schedule_data");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_schedul e_lock, "schedule_data", "schedule_lock");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_curr, "schedule_data", "curr");
- XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_idle, "schedule_data", "idle");
+ if (MEMBER_EXISTS("schedule_data", "idle"))
+ XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_idle, "schedule_data", "idle");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_sched_p riv, "schedule_data", "sched_priv");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_s_timer , "schedule_data", "s_timer");
XEN_HYPER_MEMBER_OFFSET_INIT(schedule_data_tick, "schedule_data", "tick");
@@ -539,7 +540,10 @@ xen_hyper_schedule_init(void)
}
schc->cpu_id = cpuid;
schc->curr = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_curr));
- schc->idle = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_idle));
+ if (MEMBER_EXISTS("schedule_data", "idle"))
+ schc->idle = ULONG(buf + XEN_HYPER_OFFSET(schedule_data_idle));
+ else
+ schc->idle = xht->idle_vcpu_array[cpuid];
schc->sched_priv =
ULONG(buf + XEN_HYPER_OFFSET(schedule_data_sched_priv));
if (XEN_HYPER_VALID_MEMBER(schedule_data_tick))

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 08:51 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.