xen: print "debug=y|n" during hypervisor startup
PATCH 1/1 xen: print "debug=y|n" during hypervisor startup
So that we can easily figure out whether or not we are running a debug build of Xen (e.g., via `xl dmesg').
xen/drivers/char/console.c +7 -2
@@ -577,6 +577,11 @@ void __init console_init_preirq(void) {char *p;int sh; +char debug ='n' ; + +#ifndef NDEBUG + debug ='y' ; +#endif serial_init_preirq ();
@@ -608,9 +613,9 @@ void __init console_init_preirq(void)spin_lock (&console_lock);__putstr (xen_banner ());spin_unlock (&console_lock); -printk ("Xen version %d.%d%s (%s@%s) (%s) %s\n" , +printk ("Xen version %d.%d%s (%s@%s debug=%c) (%s) %s\n" ,xen_major_version (),xen_minor_version (),xen_extra_version (), -xen_compile_by (),xen_compile_domain (), +xen_compile_by (),xen_compile_domain (), debug,xen_compiler (),xen_compile_date ());printk ("Latest ChangeSet: %s\n" ,xen_changeset ());
Quoted 9 lines · Dario Faggioli
So that we can easily figure out whether or not we are running a debug build of Xen (e.g., via `xl dmesg').
Signed-off-by Dario Faggioli <[email protected]>
xen/drivers/char/console.c void __init console_init_preirq(void) · line 584
Quoted 8 lines
xen/drivers/char/console.c +5
-0@@ -577,6 +577,11 @@ void __init console_init_preirq(void) {char *p;int sh; +char debug ='n' ; + +#ifndef NDEBUG + debug ='y' ; +#endif
While the compiler should certainly do the right thing,
#ifndef NDEBUG
char debug = 'y';
#else
char debug = 'n';
#endif
is arguably neater.
~Andrew
Quoted 20 lines
xen/drivers/char/console.c +2
-2serial_init_preirq ();@@ -608,9 +613,9 @@ void __init console_init_preirq(void)spin_lock (&console_lock);__putstr (xen_banner ());spin_unlock (&console_lock); -printk ("Xen version %d.%d%s (%s@%s) (%s) %s\n" , +printk ("Xen version %d.%d%s (%s@%s debug=%c) (%s) %s\n" ,xen_major_version (),xen_minor_version (),xen_extra_version (), -xen_compile_by (),xen_compile_domain (), +xen_compile_by (),xen_compile_domain (), debug,xen_compiler (),xen_compile_date ());printk ("Latest ChangeSet: %s\n" ,xen_changeset ());_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 21 lines · Dario Faggioli
So that we can easily figure out whether or not we are running a debug build of Xen (e.g., via `xl dmesg').
Signed-off-by Dario Faggioli <[email protected]>xen/drivers/char/console.c +5
-0@@ -577,6 +577,11 @@ void __init console_init_preirq(void) {char *p;int sh; +char debug ='n' ; + +#ifndef NDEBUG + debug ='y' ; +#endif serial_init_preirq ();
xen/drivers/char/console.c void __init console_init_preirq(void) · line 619
Quoted 9 lines
xen/drivers/char/console.c +2
-2@@ -608,9 +613,9 @@ void __init console_init_preirq(void)spin_lock (&console_lock);__putstr (xen_banner ());spin_unlock (&console_lock); -printk ("Xen version %d.%d%s (%s@%s) (%s) %s\n" , +printk ("Xen version %d.%d%s (%s@%s debug=%c) (%s) %s\n" ,xen_major_version (),xen_minor_version (),xen_extra_version (), -xen_compile_by (),xen_compile_domain (), +xen_compile_by (),xen_compile_domain (), debug,xen_compiler (),xen_compile_date ());
Rather odd to put it in with the xen_compile_by() info. How about before xen_compile_date(), and not inside any brackets?
-- Keir
Quoted 2 lines
xen/drivers/char/console.c +0
-0printk ("Latest ChangeSet: %s\n" ,xen_changeset ());
Quoted 5 lines · Keir Fraser
Quoted 5 lines
xen/drivers/char/console.c +0
-1@@ -608,9 +613,9 @@ void __init console_init_preirq(void)spin_lock (&console_lock);__putstr (xen_banner ());spin_unlock (&console_lock); - printk("Xen version %d.%d%s (%s@%s) (%s) %s\n",
Quoted 9 lines
xen/drivers/char/console.c void __init console_init_preirq(void) · line 619
Quoted 5 lines
xen/drivers/char/console.c +2
-1+printk ("Xen version %d.%d%s (%s@%s debug=%c) (%s) %s\n" ,xen_major_version (),xen_minor_version (),xen_extra_version (), -xen_compile_by (),xen_compile_domain (), +xen_compile_by (),xen_compile_domain (), debug,xen_compiler (),xen_compile_date ());Rather odd to put it in with the
xen_compile_by()info. How about beforexen_compile_date(), and not inside any brackets?
Yeah... I couldn't really make up my mind about where it was better to put it! :-)
I'll go for what you suggest, thanks.
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel