[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEN] 'd' key dumps both host and guest state.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1168623566 0
# Node ID ba239a4a7c3f25598d7e3f5ee8c03f1d41c94092
# Parent  e5ded8fe74adc87cbc285af82bfaeefcb28d6fc4
[XEN] 'd' key dumps both host and guest state.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/common/keyhandler.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff -r e5ded8fe74ad -r ba239a4a7c3f xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Fri Jan 12 17:16:45 2007 +0000
+++ b/xen/common/keyhandler.c   Fri Jan 12 17:39:26 2007 +0000
@@ -95,6 +95,11 @@ static void __dump_execstate(void *unuse
 static void __dump_execstate(void *unused)
 {
     dump_execution_state();
+    printk("*** Dumping CPU%d guest state: ***\n", smp_processor_id());
+    if ( is_idle_vcpu(current) )
+        printk("No guest context (CPU is idle).\n");
+    else
+        show_execution_state(guest_cpu_user_regs());
 }
 
 static void dump_registers(unsigned char key, struct cpu_user_regs *regs)
@@ -104,16 +109,18 @@ static void dump_registers(unsigned char
     printk("'%c' pressed -> dumping registers\n", key);
 
     /* Get local execution state out immediately, in case we get stuck. */
-    printk("\n*** Dumping CPU%d state: ***\n", smp_processor_id());
-    show_execution_state(regs);
+    printk("\n*** Dumping CPU%d host state: ***\n", smp_processor_id());
+    __dump_execstate(NULL);
 
     for_each_online_cpu ( cpu )
     {
         if ( cpu == smp_processor_id() )
             continue;
-        printk("\n*** Dumping CPU%d state: ***\n", cpu);
+        printk("\n*** Dumping CPU%d host state: ***\n", cpu);
         on_selected_cpus(cpumask_of_cpu(cpu), __dump_execstate, NULL, 1, 1);
     }
+
+    printk("\n");
 }
 
 static void halt_machine(unsigned char key, struct cpu_user_regs *regs)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.