build: add debug menu to Kconfig
RFC PATCH 1/2 build: add debug menu to Kconfig
There are a number of debugging options for Xen so the idea is to have a menu to group them all together.
---
This is more of an RFC than a merge request. If this seems reasonable I'll add all the other debugging options under this menu as well. Obviously if this seems reasonable and the patch is fine we can merge it and I'll submit the others as a follow up.
--- xen/Kconfig | 2 ++ xen/Kconfig.debug | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 xen/Kconfig.debug
xen/Kconfig +2 -0
@@ -26,3 +26,5 @@ config DEFCONFIG_LIST config EXPERT string option env="XEN_CONFIG_EXPERT" + +source "Kconfig.debug"
xen/Kconfig.debug new file +6 -0
@@ -0,0 +1,6 @@ + +menuconfig DEBUG + bool "Debugging Options" + ---help--- + If you want to debug Xen say Y and select any additional debugging + support options.
Signature · 7 lines
2.7.3 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
RFC PATCH 2/2 build: convert crash_debug to Kconfig
Convert the crash_debug option to Kconfig as CONFIG_CRASH_DEBUG. This was previously togglable on the command line so this adds a message for users enabling it from the command line to tell them to enable it from make menuconfig.
---
This is an example of using the debug menu.
--- docs/misc/crashdb.txt | 4 ++-- xen/Kconfig.debug | 11 +++++++++++ xen/Rules.mk | 5 +++-- xen/arch/x86/Makefile | 3 +-- xen/arch/x86/x86_64/Makefile | 2 +- xen/common/Makefile | 2 +- xen/include/asm-x86/debugger.h | 2 +- xen/include/xen/gdbstub.h | 2 +- 8 files changed, 21 insertions(+), 10 deletions(-)
docs/misc/crashdb.txt +2 -2
@@ -5,7 +5,7 @@ Xen has a simple gdb stub for doing post-mortem debugging i.e. once you've crashed it, you get to poke around and find out why. There's also a special key handler for making it crash, which is handy. -You need to have crash_debug=y set when compiling , and you also need +You need to have CRASH_DEBUG=y set when compiling, and you also need to enable it on the Xen command line, eg by gdb=com1. If you need to have a serial port shared between gdb and the console,
@@ -19,7 +19,7 @@ if you have a simple null modem connection between the test box and the workstation, and aren't using a H/L split console: * Set debug=y in Config.mk - * Set crash_debug=y in xen/Rules.mk + * Set CRASH_DEBUG=y with `make -C xen menuconfig` * Make the changes in the attached patch, and build. * Arrange to pass gdb=com1 as a hypervisor command line argument (I already have com1=38400,8n1 console=com1,vga sync_console)
xen/Kconfig.debug +11 -0
@@ -4,3 +4,14 @@ menuconfig DEBUG ---help--- If you want to debug Xen say Y and select any additional debugging support options. + +if DEBUG + +config CRASH_DEBUG + bool "Crash Debugging Support" + depends on X86 + ---help--- + If you want to be able to attach gdb to Xen to be able to debug + Xen if it crashes then say Y. + +endif # DEBUG
xen/Rules.mk +3 -2
@@ -7,7 +7,6 @@ verbose ?= n perfc ?= n perfc_arrays ?= n lock_profile ?= n -crash_debug ?= n frame_pointer ?= n lto ?= n
@@ -30,6 +29,9 @@ endif ifneq ($(origin kexec),undefined) $(error "You must use 'make menuconfig' to enable/disable kexec now.") endif +ifneq ($(origin crash_debug),undefined) +$(error "You must use 'make menuconfig' to enable/disable crash_debug now.") +endif # Set ARCH/SUBARCH appropriately. override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
@@ -53,7 +55,6 @@ CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h CFLAGS += '-D__OBJECT_FILE__="$@"' CFLAGS-$(verbose) += -DVERBOSE -CFLAGS-$(crash_debug) += -DCRASH_DEBUG CFLAGS-$(perfc) += -DPERF_COUNTERS CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE
xen/arch/x86/Makefile +1 -2
@@ -24,6 +24,7 @@ obj-y += domain_page.o obj-y += e820.o obj-y += extable.o obj-y += flushtlb.o +obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o obj-y += i387.o obj-y += i8259.o obj-y += io_apic.o
@@ -62,8 +63,6 @@ obj-y += hpet.o obj-y += vm_event.o obj-y += xstate.o -obj-$(crash_debug) += gdbstub.o - x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h efi-y := $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \
xen/arch/x86/x86_64/Makefile +1 -1
@@ -14,4 +14,4 @@ obj-y += cpu_idle.o obj-y += cpufreq.o obj-bin-$(CONFIG_KEXEC) += kexec_reloc.o -obj-$(crash_debug) += gdbstub.o +obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o
xen/common/Makefile +1 -1
@@ -8,6 +8,7 @@ obj-y += domain.o obj-y += event_2l.o obj-y += event_channel.o obj-y += event_fifo.o +obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o obj-y += grant_table.o obj-y += guestcopy.o obj-bin-y += gunzip.init.o
@@ -61,7 +62,6 @@ obj-y += xmalloc_tlsf.o obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma unlzo unlz4 earlycpio,$(n).init.o) obj-$(perfc) += perfc.o -obj-$(crash_debug) += gdbstub.o obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o)
xen/include/asm-x86/debugger.h +1 -1
@@ -39,7 +39,7 @@#define DEBUGGER_trap_fatal (_v, _r) \ if ( debugger_trap_fatal(_v, _r) ) return; -#if defined(CRASH_DEBUG ) +#if defined(CONFIG_CRASH_DEBUG )#include <xen/gdbstub.h>
xen/include/xen/gdbstub.h +1 -1
@@ -23,7 +23,7 @@#include <asm/atomic.h> #include <asm/page.h> -#ifdef CRASH_DEBUG +#ifdef CONFIG_CRASH_DEBUG struct gdb_context { int serhnd; /* handle on our serial line */
Signature · 7 lines
2.7.3 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [RFC PATCH 2/2] build: convert crash_debug to Kconfig
Quoted 51 lines · Doug Goldstein
Convert the
crash_debugoption toKconfigasCONFIG_CRASH_DEBUG. This was previously togglable on the command line so this adds a message for users enabling it from the command line to tell them to enable it from make menuconfig.Signed-off-by Doug Goldstein <[email protected]>---
This is an example of using the debug menu.CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>--- docs/misc/crashdb.txt | 4 ++-- xen/Kconfig.debug | 11 +++++++++++ xen/Rules.mk | 5 +++-- xen/arch/x86/Makefile | 3 +-- xen/arch/x86/x86_64/Makefile | 2 +- xen/common/Makefile | 2 +- xen/include/asm-x86/debugger.h | 2 +- xen/include/xen/gdbstub.h | 2 +- 8 files changed, 21 insertions(+), 10 deletions(-)docs/misc/crashdb.txt +2
-2@@ -5,7 +5,7 @@ Xen has a simple gdb stub for doing post-mortem debugging i.e. once you've crashed it, you get to poke around and find out why. There's also a special key handler for making it crash, which is handy. -You need to have crash_debug=y set when compiling , and you also need +You need to have CRASH_DEBUG=y set when compiling, and you also need to enable it on the Xen command line, eg by gdb=com1. If you need to have a serial port shared between gdb and the console,@@ -19,7 +19,7 @@ if you have a simple null modem connection between the test box and the workstation, and aren't using a H/L split console: * Set debug=y in Config.mk - * Set crash_debug=y in xen/Rules.mk + * Set CRASH_DEBUG=y with `make -C xen menuconfig` * Make the changes in the attached patch, and build. * Arrange to pass gdb=com1 as a hypervisor command line argument (I already have com1=38400,8n1 console=com1,vga sync_console)xen/Kconfig.debug +0
-0
xen/Kconfig.debug menuconfig DEBUG · line 8
Quoted 5 lines
xen/Kconfig.debug +2
-0@@ -4,3 +4,14 @@ menuconfig DEBUG ---help--- If you want to debug Xen say Y and select any additional debugging support options. + +if DEBUG
Perhaps if !defined then atuomatically enable it? Looking at Config.mk it seems you could do crash_debug without debug=y?
Why is this called crash_debug and not 'crash_gdb' ..? Ah [after reading the docs] it can't do breakpoints or any of that. Just to pour over the data after a crash. Ah, you can resume the hypervisor after this. OK, definitly not for field analysis.
And kexec/kdump is much more powerful than this.
xen/Kconfig.debug menuconfig DEBUG · line 15
Quoted 7 lines
xen/Kconfig.debug +7
-0+ +config CRASH_DEBUG + bool "Crash Debugging Support" + depends on X86 + ---help--- + If you want to be able to attach gdb to Xen to be able to debug + Xen if it crashes then say Y.
Should it have a link to the docs ? On how to use it?
And maybe mention that kexec/kdump is better suited for capturing the whole machine and one can do post-mortem analysis much more intensly?
Quoted 117 lines
xen/Kconfig.debug +2
-0+ +endif # DEBUGxen/Rules.mk +3
-2@@ -7,7 +7,6 @@ verbose ?= n perfc ?= n perfc_arrays ?= n lock_profile ?= n -crash_debug ?= n frame_pointer ?= n lto ?= n@@ -30,6 +29,9 @@ endif ifneq ($(origin kexec),undefined) $(error "You must use 'make menuconfig' to enable/disable kexec now.") endif +ifneq ($(origin crash_debug),undefined) +$(error "You must use 'make menuconfig' to enable/disable crash_debug now.") +endif # Set ARCH/SUBARCH appropriately. override TARGET_SUBARCH := $(XEN_TARGET_ARCH)@@ -53,7 +55,6 @@ CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h CFLAGS += '-D__OBJECT_FILE__="$@"' CFLAGS-$(verbose) += -DVERBOSE -CFLAGS-$(crash_debug) += -DCRASH_DEBUG CFLAGS-$(perfc) += -DPERF_COUNTERS CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILExen/arch/x86/Makefile +1
-2@@ -24,6 +24,7 @@ obj-y += domain_page.o obj-y += e820.o obj-y += extable.o obj-y += flushtlb.o +obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o obj-y += i387.o obj-y += i8259.o obj-y += io_apic.o@@ -62,8 +63,6 @@ obj-y += hpet.o obj-y += vm_event.o obj-y += xstate.o -obj-$(crash_debug) += gdbstub.o - x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h efi-y := $(shell if [ ! -r $(BASEDIR)/include/xen/compile.h -o \xen/arch/x86/x86_64/Makefile +1
-1@@ -14,4 +14,4 @@ obj-y += cpu_idle.o obj-y += cpufreq.o obj-bin-$(CONFIG_KEXEC) += kexec_reloc.o -obj-$(crash_debug) += gdbstub.o +obj-$(CONFIG_CRASH_DEBUG) += gdbstub.oxen/common/Makefile +1
-1@@ -8,6 +8,7 @@ obj-y += domain.o obj-y += event_2l.o obj-y += event_channel.o obj-y += event_fifo.o +obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o obj-y += grant_table.o obj-y += guestcopy.o obj-bin-y += gunzip.init.o@@ -61,7 +62,6 @@ obj-y += xmalloc_tlsf.o obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma unlzo unlz4 earlycpio,$(n).init.o) obj-$(perfc) += perfc.o -obj-$(crash_debug) += gdbstub.o obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o)xen/include/asm-x86/debugger.h +1
-1@@ -39,7 +39,7 @@#define DEBUGGER_trap_fatal (_v, _r) \ if ( debugger_trap_fatal(_v, _r) ) return; -#if defined(CRASH_DEBUG ) +#if defined(CONFIG_CRASH_DEBUG )#include <xen/gdbstub.h> xen/include/xen/gdbstub.h +1
-1@@ -23,7 +23,7 @@#include <asm/atomic.h> #include <asm/page.h> -#ifdef CRASH_DEBUG +#ifdef CONFIG_CRASH_DEBUG struct gdb_context { int serhnd; /* handle on our serial line */Signature · 7 lines
2.7.3 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [RFC PATCH 2/2] build: convert crash_debug to Kconfig
Quoted 52 lines · Konrad Rzeszutek Wilk
Quoted 51 lines · Doug Goldstein
Convert the
crash_debugoption toKconfigasCONFIG_CRASH_DEBUG. This was previously togglable on the command line so this adds a message for users enabling it from the command line to tell them to enable it from make menuconfig.Signed-off-by Doug Goldstein <[email protected]>---
This is an example of using the debug menu.CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Andrew Cooper <[email protected]>--- docs/misc/crashdb.txt | 4 ++-- xen/Kconfig.debug | 11 +++++++++++ xen/Rules.mk | 5 +++-- xen/arch/x86/Makefile | 3 +-- xen/arch/x86/x86_64/Makefile | 2 +- xen/common/Makefile | 2 +- xen/include/asm-x86/debugger.h | 2 +- xen/include/xen/gdbstub.h | 2 +- 8 files changed, 21 insertions(+), 10 deletions(-)docs/misc/crashdb.txt +2
-2@@ -5,7 +5,7 @@ Xen has a simple gdb stub for doing post-mortem debugging i.e. once you've crashed it, you get to poke around and find out why. There's also a special key handler for making it crash, which is handy. -You need to have crash_debug=y set when compiling , and you also need +You need to have CRASH_DEBUG=y set when compiling, and you also need to enable it on the Xen command line, eg by gdb=com1. If you need to have a serial port shared between gdb and the console,@@ -19,7 +19,7 @@ if you have a simple null modem connection between the test box and the workstation, and aren't using a H/L split console: * Set debug=y in Config.mk - * Set crash_debug=y in xen/Rules.mk + * Set CRASH_DEBUG=y with `make -C xen menuconfig` * Make the changes in the attached patch, and build. * Arrange to pass gdb=com1 as a hypervisor command line argument (I already have com1=38400,8n1 console=com1,vga sync_console)xen/Kconfig.debug +0
-0@@ -4,3 +4,14 @@ menuconfig DEBUG
Quoted 8 lines
xen/Kconfig.debug menuconfig DEBUG · line 8
Quoted 5 lines
xen/Kconfig.debug +2
-0---help--- If you want to debug Xen say Y and select any additional debugging support options. + +if DEBUGPerhaps if !defined then atuomatically enable it? Looking at Config.mk it seems you could do
crash_debugwithout debug=y?
debug=y unfortunately is more than just a "meta" option that selects verbose=y and frame_pointer=y. It also turns off NDEBUG so that debug messages appear. I'm not sure how that should be mapped in the context of this patch. Should the messages be enabled when DEBUG is enabled or should there be another option?
If debug messages are enabled with DEBUG that would certainly be a behavior change since now someone could have crash_debug=y debug=n but I'm not sure if that's desired?
Quoted 7 lines
Why is this called
crash_debugand not 'crash_gdb' ..? Ah [after reading the docs] it can't do breakpoints or any of that. Just to pour over the data after a crash. Ah, you can resume the hypervisor after this. OK, definitly not for field analysis.And kexec/kdump is much more powerful than this.
yeah I wondered that myself as well and came to the conclusion it was limited. Good point about kexec/kdump. I should definitely update the description to be more verbose.
Quoted 11 lines
xen/Kconfig.debug menuconfig DEBUG · line 15
Quoted 9 lines
xen/Kconfig.debug +7
-0+ +config CRASH_DEBUG + bool "Crash Debugging Support" + depends on X86 + ---help--- + If you want to be able to attach gdb to Xen to be able to debug + Xen if it crashes then say Y.Should it have a link to the docs ? On how to use it?
yeah I think maybe just pointing someone to docs/misc/crashdb.txt cause its not immediately obvious that's the doc file to go with crash_debug.
Quoted 3 lines
And maybe mention that kexec/kdump is better suited for capturing the whole machine and one can do post-mortem analysis much more intensly?
Yeah that's a really good point. I didn't think of that.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [RFC PATCH 2/2] build: convert crash_debug to Kconfig
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 25.03.16 at 22:02, <[email protected]> wrote:
Quoted 12 lines · Konrad Rzeszutek Wilk
xen/Kconfig.debug menuconfig DEBUG · line 8
Quoted 8 lines · Doug Goldstein
xen/Kconfig.debug +2
-0@@ -4,3 +4,14 @@ menuconfig DEBUG ---help--- If you want to debug Xen say Y and select any additional debugging support options. + +if DEBUGPerhaps if !defined then atuomatically enable it? Looking at Config.mk it seems you could do
crash_debugwithout debug=y?
Quoted 5 lines
debug=y unfortunately is more than just a "meta" option that selects verbose=y and frame_pointer=y. It also turns off NDEBUG so that debug messages appear. I'm not sure how that should be mapped in the context of this patch. Should the messages be enabled when DEBUG is enabled or should there be another option?
Let's not make this too fine grained, at least for now. I.e. enabling DEBUG should mean exactly what "debug=y" so far meant.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [RFC PATCH 2/2] build: convert crash_debug to Kconfig
Quoted 21 lines · Jan Beulich
Quoted 15 lines
Quoted 1 line
Quoted 1 line · On 25.03.16 at 22:02, <[email protected]> wrote:
Quoted 12 lines · Konrad Rzeszutek Wilk
xen/Kconfig.debug menuconfig DEBUG · line 8
Quoted 8 lines · Doug Goldstein
xen/Kconfig.debug +2
-0@@ -4,3 +4,14 @@ menuconfig DEBUG ---help--- If you want to debug Xen say Y and select any additional debugging support options. + +if DEBUGPerhaps if !defined then atuomatically enable it? Looking at Config.mk it seems you could do
crash_debugwithout debug=y?Quoted 5 lines
debug=y unfortunately is more than just a "meta" option that selects verbose=y and frame_pointer=y. It also turns off NDEBUG so that debug messages appear. I'm not sure how that should be mapped in the context of this patch. Should the messages be enabled when DEBUG is enabled or should there be another option?
Quoted 5 lines
Let's not make this too fine grained, at least for now. I.e. enabling DEBUG should mean exactly what "debug=y" so far meant.
Jan
That's what I was stating this patch does. The question revolved around the fact that you can do crash_debug=y debug=n right now and if that made sense. Should crash_debug=y imply debug=y as well.
So things are more fine grained and I was proposing we make it less so if the fine grained choices didn't make sense.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [RFC PATCH 2/2] build: convert crash_debug to Kconfig
In reply to Doug GoldsteinQuoted 15 lines
Quoted 1 line
Quoted 1 line · On 25.03.16 at 22:02, <[email protected]> wrote:
Quoted 12 lines · Konrad Rzeszutek Wilk
xen/Kconfig.debug menuconfig DEBUG · line 8
Quoted 8 lines · Doug Goldstein
xen/Kconfig.debug +2
-0@@ -4,3 +4,14 @@ menuconfig DEBUG ---help--- If you want to debug Xen say Y and select any additional debugging support options. + +if DEBUGPerhaps if !defined then atuomatically enable it? Looking at Config.mk it seems you could do
crash_debugwithout debug=y?
Quoted 5 lines
debug=y unfortunately is more than just a "meta" option that selects verbose=y and frame_pointer=y. It also turns off NDEBUG so that debug messages appear. I'm not sure how that should be mapped in the context of this patch. Should the messages be enabled when DEBUG is enabled or should there be another option?
I think this should be each another option, defaulting in a way matching what the current implications are. Perhaps, as elsewhere, the prompts should again be made dependent upon EXPERT.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Re: [RFC PATCH 2/2] build: convert crash_debug to Kconfig
Quoted 22 lines
Quoted 16 lines
Quoted 2 lines · On 09.04.16 at 01:24, <[email protected]> wrote:
Quoted 1 line · On 25.03.16 at 22:02, <[email protected]> wrote:
Quoted 12 lines · Konrad Rzeszutek Wilk
xen/Kconfig.debug menuconfig DEBUG · line 8
Quoted 8 lines · Doug Goldstein
xen/Kconfig.debug +2
-0@@ -4,3 +4,14 @@ menuconfig DEBUG ---help--- If you want to debug Xen say Y and select any additional debugging support options. + +if DEBUGPerhaps if !defined then atuomatically enable it? Looking at Config.mk it seems you could do
crash_debugwithout debug=y?Quoted 5 lines
debug=y unfortunately is more than just a "meta" option that selects verbose=y and frame_pointer=y. It also turns off NDEBUG so that debug messages appear. I'm not sure how that should be mapped in the context of this patch. Should the messages be enabled when DEBUG is enabled or should there be another option?
Quoted 3 lines
I think this should be each another option, defaulting in a way matching what the current implications are. Perhaps, as elsewhere, the prompts should again be made dependent upon EXPERT.
And, realizing this kind of contradicts an earlier reply, please take this as a partial override to the earlier one. I'm really mainly concerned of things getting too fine grained if they're not made EXPERT dependent. Apart from that I think flexibility is generally useful.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines · Doug Goldstein
There are a number of debugging options for Xen so the idea is to have a menu to group them all together.
Signed-off-by Doug Goldstein <[email protected]>---
This is more of an RFC than a merge request. If this seems reasonable I'll add all the other debugging options under this menu as well. Obviously if this seems reasonable and the patch is fine we can merge it and I'll submit the others as a follow up.
There would be more I presume - the lock profile, gcov, crash, etc..
And with the 'randconfig' that means we can turn on/off various options and find interesting dependencies (if any).
Anyhow back to this patch.
The usual method for distros of compiling an Xen with and without debug (like Xenserver) is:
make %{?_smp_mflags} max_phys_cpus=384 xen tools
make %{?_smp_mflags} -C xen clean
make %{?_smp_mflags} -C xen debug=y max_phys_cpus=384
It would be preferrable to still have this functionality. As in, if we do 'debug=y' then verbose=y and frame_pointer=y are automatically enabled?
Is that something the Kconfig magic can still do?
Quoted 28 lines
CC Ian Jackson <[email protected]>CC Jan Beulich <[email protected]>CC Keir Fraser <[email protected]>CC Tim Deegan <[email protected]>--- xen/Kconfig | 2 ++ xen/Kconfig.debug | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 xen/Kconfig.debugxen/Kconfig +2
-0@@ -26,3 +26,5 @@ config DEFCONFIG_LIST config EXPERT string option env="XEN_CONFIG_EXPERT" + +source "Kconfig.debug"xen/Kconfig.debug new file +0
-0
xen/Kconfig.debug line 6
Quoted 6 lines
xen/Kconfig.debug new file +6
-0@@ -0,0 +1,6 @@ + +menuconfig DEBUG + bool "Debugging Options" + ---help--- + If you want to debug Xen say Y and select any additional debugging + support options.
.. You can also add:
Should not be used for production builds.
Note that any _ASSERTS_ in the code without debug are emitted.
Quoted 8 lines
Signature · 7 lines
2.7.3 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 4 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · Doug Goldstein
There are a number of debugging options for Xen so the idea is to have a menu to group them all together.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Doug Goldstein <[email protected]>---
This is more of an RFC than a merge request. If this seems reasonable I'll add all the other debugging options under this menu as well. Obviously if this seems reasonable and the patch is fine we can merge it and I'll submit the others as a follow up.There would be more I presume - the lock profile, gcov, crash, etc..
Yes. I just wanted to do one to get an idea of how people felt about the menu.
Quoted 3 lines
And with the 'randconfig' that means we can turn on/off various options and find interesting dependencies (if any).
Exactly. We've found a number of interesting cases with randconfig already and fixed them. I previously checked some of them against some of the stable trees and found the combos failed so Travis CI + randconfig are finding issues but not commonly used ones.
Anyway back to this patch.
Quoted 3 lines
Anyhow back to this patch.
:-D
Quoted 4 lines
The usual method for distros of compiling an Xen with and without debug (like Xenserver) is:
This feels very... http://xkcd.com/1172/
Quoted 1 line
make %{?_smp_mflags} max_phys_cpus=384 xen tools
So two comments on this line.
1) ick! "xen" and "tools" targets have been marked as Legacy since October 5th 2005!
2) That's been broken since I got rid of max_phys_cpus and moved it to CONFIG_NR_CPUS (I think that's the name).
spec files for things like busybox include the config file and just copy it in before running make
cp someplace/config.release xen/.config
make %{?_smp_mflags} dist-xen dist-tools
Quoted 2 lines
make %{?_smp_mflags} -C xen clean
why use the directory here but not in the first step?
make %{?_smp_mflags} clean-xen
would be the matching target
Quoted 1 line
make %{?_smp_mflags} -C xen debug=y max_phys_cpus=384
ok mind blown. We build xen in the first step with the Legacy target and then changing to the directory here.
Quoted 5 lines
It would be preferrable to still have this functionality. As in, if we do 'debug=y' then verbose=y and frame_pointer=y are automatically enabled?
Is that something the
Kconfigmagic can still do?
I could do some wizard-y to allow debug=y to turn things on. Not sure if the lowercase will work but I can definitely think of a way to make the uppercase DEBUG=y work. But at that point I don't see the point. I see the point of debug=y since that's a top level thing.
<continuing the conversation in the other patch since you brought up some good points there>
Quoted 49 lines
Quoted 28 lines
CC Ian Jackson <[email protected]>CC Jan Beulich <[email protected]>CC Keir Fraser <[email protected]>CC Tim Deegan <[email protected]>--- xen/Kconfig | 2 ++ xen/Kconfig.debug | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 xen/Kconfig.debugxen/Kconfig +2
-0@@ -26,3 +26,5 @@ config DEFCONFIG_LIST config EXPERT string option env="XEN_CONFIG_EXPERT" + +source "Kconfig.debug"xen/Kconfig.debug new file +0
-0xen/Kconfig.debug line 6
Quoted 6 lines
xen/Kconfig.debug new file +6
-0@@ -0,0 +1,6 @@ + +menuconfig DEBUG + bool "Debugging Options" + ---help--- + If you want to debug Xen say Y and select any additional debugging + support options... You can also add:
Should not be used for production builds.
Note that any _ASSERTS_ in the code without debug are emitted.
Quoted 8 lines
Signature · 7 lines
2.7.3 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines · Doug Goldstein
Quoted 8 lines · Konrad Rzeszutek Wilk
Quoted 7 lines
This is more of an RFC than a merge request. If this seems reasonable I'll
add all the other debugging options under this menu as well. Obviously if
this seems reasonable and the patch is fine we can merge it and I'll submit
the others as a follow up.
Quoted 6 lines
Quoted 2 lines
There would be more I presume - the lock profile, gcov, crash, etc..
Yes. I just wanted to do one to get an idea of how people felt about the
menu.
Cpupools have some kind of very verbose debugging that could fit in here, and scheduling too.
So, FWIW, I indeed like this menu, and am up for plumbing the two components above under it. :-)
Thanks and Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 24.03.16 at 17:48, <[email protected]> wrote:
There are a number of debugging options for Xen so the idea is to have a menu to group them all together.
Signed-off-by Doug Goldstein <[email protected]>---
This is more of an RFC than a merge request. If this seems reasonable I'll add all the other debugging options under this menu as well. Obviously if this seems reasonable and the patch is fine we can merge it and I'll submit the others as a follow up.
I certainly welcome this, provided a solution to the so far shared meaning of "debug=y" for the xen/ and tools/ subtrees can be found. Allowing them to use different settings is maybe a nice option, but by default the build mode for both subtrees should imo be the same.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel