control applying of no-debug config
v2 cover control applying of no-debug config
1. enable IPIPE_DEBUG uniformly for all arch by default in order to use uniform method to control it via applying config fragment or not.
2. create common config fragment to switch debug off.
3. add control to apply config fragment or not.
4. add kas option to control applying config fragment.
Hongzhan Chen (5):
recipes-kernel: arm64_config: enable IPIPE_DEBUG for arm64 by default
recipes-kernel: armhf_config: enable IPIPE_DEBUG for armhf by default
recipes-kernel: add common config fragment file to disable debug recipes-kernel/linux: control appyling of no debug config fragment Add kas option for swithing off debug
opt-set-nodbg.yml | 20 ++++++++++++++++++++ recipes-kernel/linux/files/arm64_defconfig | 9 +++++---- recipes-kernel/linux/files/armhf_defconfig | 15 +++++++++++++-- recipes-kernel/linux/files/common_nodbg.cfg | 1 + recipes-kernel/linux/linux-xenomai.inc | 10 +++++++++- 5 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 opt-set-nodbg.yml create mode 100644 recipes-kernel/linux/files/common_nodbg.cfg
Signature · 1 line
2.17.1
PATCH v2 1/5 recipes-kernel: arm64_config: enable IPIPE_DEBUG for arm64 by default
Enable IPIPE_DEBUG for arm64 by default. We enable IPIPE_DEBUG for all arch types uniformly by default in order to controll enabling and disabling them via same method.
--- recipes-kernel/linux/files/arm64_defconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
recipes-kernel/linux/files/arm64_defconfig +5 -4
@@ -191,7 +191,7 @@ CONFIG_KALLSYMS_ALL=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_PRINTK=y CONFIG_PRINTK_NMI=y -# CONFIG_RAW_PRINTK is not set +CONFIG_RAW_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y
@@ -410,7 +410,6 @@ CONFIG_XENO_OPT_DEBUG_LEGACY=y CONFIG_XENO_OPT_DEBUG_TRACE_RELAX=y CONFIG_XENO_OPT_WATCHDOG=y CONFIG_XENO_OPT_WATCHDOG_TIMEOUT=4 -# CONFIG_XENO_TODO is not set # # Drivers
@@ -449,7 +448,6 @@ CONFIG_XENO_DRIVERS_CAN_BUS_ERR=y # CONFIG_XENO_DRIVERS_CAN_CALC_BITTIME_OLD is not set CONFIG_XENO_DRIVERS_CAN_VIRT=y # CONFIG_XENO_DRIVERS_CAN_FLEXCAN is not set -# CONFIG_XENO_DRIVERS_CAN_PEAK_CANFD is not set CONFIG_XENO_DRIVERS_CAN_SJA1000=y CONFIG_XENO_DRIVERS_CAN_SJA1000_ISA=y CONFIG_XENO_DRIVERS_CAN_SJA1000_MEM=y
@@ -5907,8 +5905,11 @@ CONFIG_FRAME_POINTER=y CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 CONFIG_MAGIC_SYSRQ_SERIAL=y -# CONFIG_IPIPE_DEBUG is not set +CONFIG_IPIPE_DEBUG=y +CONFIG_IPIPE_DEBUG_CONTEXT=y +CONFIG_IPIPE_DEBUG_INTERNAL=y CONFIG_HAVE_IPIPE_TRACER_SUPPORT=y +# CONFIG_IPIPE_TRACE is not set CONFIG_DEBUG_KERNEL=y #
Signature · 1 line
2.17.1
PATCH v2 2/5 recipes-kernel: armhf_config: enable IPIPE_DEBUG for armhf by default
In reply to Hongzhan ChenEnable IPIPE_DEBUG for armhf by default. We enable IPIPE_DEBUG for all arch types uniformly by default in order to controll enabling and disabling them via same method.
--- recipes-kernel/linux/files/armhf_defconfig | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
recipes-kernel/linux/files/armhf_defconfig +13 -2
@@ -162,7 +162,7 @@ CONFIG_KALLSYMS=y CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_PRINTK=y CONFIG_PRINTK_NMI=y -# CONFIG_RAW_PRINTK is not set +CONFIG_RAW_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y
@@ -1079,6 +1079,14 @@ CONFIG_IPIPE_CORE_APIREV=2 CONFIG_IPIPE_WANT_APIREV_2=y CONFIG_IPIPE_TARGET_APIREV=2 CONFIG_IPIPE_HAVE_HOSTRT=y + +# +# CAUTION: DEBUG_LL must be selected, and properly configured for +# + +# +# RAW_PRINTK to work. Otherwise, you will get no output on raw_printk() +# CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set
@@ -6820,8 +6828,11 @@ CONFIG_SECTION_MISMATCH_WARN_ONLY=y CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 CONFIG_MAGIC_SYSRQ_SERIAL=y -# CONFIG_IPIPE_DEBUG is not set +CONFIG_IPIPE_DEBUG=y +CONFIG_IPIPE_DEBUG_CONTEXT=y +CONFIG_IPIPE_DEBUG_INTERNAL=y CONFIG_HAVE_IPIPE_TRACER_SUPPORT=y +# CONFIG_IPIPE_TRACE is not set CONFIG_DEBUG_KERNEL=y #
Signature · 1 line
2.17.1
PATCH v2 3/5 recipes-kernel: add common config fragment file to disable debug
In reply to Hongzhan ChenAdd common config fragment file to disable debug. For performance or latency testing and demonstration, debug switches should be off.
--- recipes-kernel/linux/files/common_nodbg.cfg | 1 + 1 file changed, 1 insertion(+) create mode 100644 recipes-kernel/linux/files/common_nodbg.cfg
recipes-kernel/linux/files/common_nodbg.cfg new file +1 -0
@@ -0,0 +1 @@ +# CONFIG_IPIPE_DEBUG is not set
Signature · 1 line
2.17.1
Jan Kiszka
AppliedRe: [xenomai-image PATCH v2 3/5] recipes-kernel: add common config fragment file to disable debug
Quoted 16 lines · Hongzhan Chen via Xenomai
Add common config fragment file to disable debug. For performance or latency testing and demonstration, debug switches should be off.
Signed-off-by Hongzhan Chen <[email protected]>--- recipes-kernel/linux/files/common_nodbg.cfg | 1 + 1 file changed, 1 insertion(+) create mode 100644 recipes-kernel/linux/files/common_nodbg.cfgrecipes-kernel/linux/files/common_nodbg.cfg new file +0
-0
recipes-kernel/linux/files/common_nodbg.cfg line 1
Quoted 1 line
recipes-kernel/linux/files/common_nodbg.cfg new file +1
-0@@ -0,0 +1 @@ +# CONFIG_IPIPE_DEBUG is not set
Applied to next up to this patch.
Thanks,
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Re: [xenomai-image PATCH v2 3/5] recipes-kernel: add common config fragment file to disable debug
In reply to Hongzhan ChenQuoted 16 lines · Hongzhan Chen via Xenomai
Add common config fragment file to disable debug. For performance or latency testing and demonstration, debug switches should be off.
Signed-off-by Hongzhan Chen <[email protected]>--- recipes-kernel/linux/files/common_nodbg.cfg | 1 + 1 file changed, 1 insertion(+) create mode 100644 recipes-kernel/linux/files/common_nodbg.cfgrecipes-kernel/linux/files/common_nodbg.cfg new file +0
-0
recipes-kernel/linux/files/common_nodbg.cfg line 1
Quoted 1 line
recipes-kernel/linux/files/common_nodbg.cfg new file +1
-0@@ -0,0 +1 @@ +# CONFIG_IPIPE_DEBUG is not set
What about CONFIG_XENO_OPT_DEBUG* at least?
Other kernel debug switches may also be added here eventually.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
PATCH v2 4/5 recipes-kernel/linux: control appyling of no debug config fragment
In reply to Hongzhan ChenFor performance or latency testing and demonstration, debug switches should be off but it is on by default.
--- recipes-kernel/linux/linux-xenomai.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
recipes-kernel/linux/linux-xenomai.inc +9 -1
@@ -11,9 +11,17 @@ require recipes-kernel/linux/linux-custom.inc +def is_nodbg_support(d): + dbg_ver = d.getVar('DISTRO_NODBG') or '' + return dbg_ver.startswith('YES') or dbg_ver == 'YES' + KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig" +KERNEL_NODBG_FRAGMENTS ?= "common_nodbg.cfg" +KERNEL_NODBG_FRAGMENTS_append = "${@'' if is_nodbg_support(d) else ';apply=no'}" -SRC_URI += "file://${KERNEL_DEFCONFIG}" +SRC_URI += "file://${KERNEL_DEFCONFIG} \ + file://${KERNEL_NODBG_FRAGMENTS} \ +" DEPENDS += "xenomai-kernel-source" KBUILD_DEPENDS += "xenomai-kernel-source"
Signature · 1 line
2.17.1
Re: [xenomai-image PATCH v2 4/5] recipes-kernel/linux: control appyling of no debug config fragment
Quoted 22 lines · Hongzhan Chen via Xenomai
For performance or latency testing and demonstration, debug switches should be off but it is on by default.
Signed-off-by Hongzhan Chen <[email protected]>--- recipes-kernel/linux/linux-xenomai.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)recipes-kernel/linux/linux-xenomai.inc +4
-0@@ -11,9 +11,17 @@ require recipes-kernel/linux/linux-custom.inc +def is_nodbg_support(d): + dbg_ver = d.getVar('DISTRO_NODBG') or '' + return dbg_ver.startswith('YES') or dbg_ver == 'YES' + KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"
recipes-kernel/linux/linux-xenomai.inc line 27
Quoted 10 lines
recipes-kernel/linux/linux-xenomai.inc +5
-1+KERNEL_NODBG_FRAGMENTS ?= "common_nodbg.cfg" +KERNEL_NODBG_FRAGMENTS_append = "${@'' if is_nodbg_support(d) else ';apply=no'}" -SRC_URI += "file://${KERNEL_DEFCONFIG}" +SRC_URI += "file://${KERNEL_DEFCONFIG} \ + file://${KERNEL_NODBG_FRAGMENTS} \ +" DEPENDS += "xenomai-kernel-source" KBUILD_DEPENDS += "xenomai-kernel-source"
How about
DISTRO_NODBG ?= "0"
SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('DISTRO_NODBG') == '1' else ''}"
?
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
PATCH v2 5/5 Add kas option for swithing off debug
In reply to Hongzhan ChenFor performance or latency testing and demonstration, debug switches should be off but it is on by default.
--- opt-set-nodbg.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 opt-set-nodbg.yml
opt-set-nodbg.yml new file +20 -0
@@ -0,0 +1,20 @@ +# +# Xenomai Real-Time System +# +# Copyright (C) 2021 Intel Corporation +# +# Authors: +# Hongzhan Chen <[email protected]> +# +# SPDX-License-Identifier: MIT +# + +header: + version: 10 + +# to use kernel config fragments for disabling dbg and +# improving performance + +local_conf_header: + distro-nodbg: | + DISTRO_NODBG = "YES"
Signature · 1 line
2.17.1
Re: [xenomai-image PATCH v2 5/5] Add kas option for swithing off debug
Quoted 26 lines · Hongzhan Chen via Xenomai
For performance or latency testing and demonstration, debug switches should be off but it is on by default.
Signed-off-by Hongzhan Chen <[email protected]>--- opt-set-nodbg.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 opt-set-nodbg.ymlopt-set-nodbg.yml new file +10
-0@@ -0,0 +1,20 @@ +# +# Xenomai Real-Time System +# +# Copyright (C) 2021 Intel Corporation +# +# Authors: +# Hongzhan Chen <[email protected]> +# +# SPDX-License-Identifier: MIT +#
opt-set-nodbg.yml line 20
Quoted 10 lines
opt-set-nodbg.yml new file +10
-0+ +header: + version: 10 + +# to use kernel config fragments for disabling dbg and +# improving performance + +local_conf_header: + distro-nodbg: | + DISTRO_NODBG = "YES"
We tend to use "0" / "1" for bitbake boolean vars.
Furthermore, I wonder if we shouldn't switch default to no-debug and explicitly turn debugging on in our CI/testing.
In any case, some short hint on this control in the README would be good.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Re: [xenomai-image PATCH v2 5/5] Add kas option for swithing off debug
Quoted 40 lines · Jan Kiszka via Xenomai
Quoted 26 lines · Hongzhan Chen via Xenomai
For performance or latency testing and demonstration, debug switches should be off but it is on by default.
Signed-off-by Hongzhan Chen <[email protected]>---
opt-set-nodbg.yml | 20 ++++++++++++++++++++1 file changed, 20 insertions(+)create mode 100644 opt-set-nodbg.yml
opt-set-nodbg.yml new file +10
-0@@ -0,0 +1,20 @@ +# +# Xenomai Real-Time System +# +# Copyright (C) 2021 Intel Corporation +# +# Authors: +# Hongzhan Chen <[email protected]> +# +# SPDX-License-Identifier: MIT +#opt-set-nodbg.yml line 20
Quoted 10 lines
opt-set-nodbg.yml new file +10
-0+ +header: + version: 10 + +# to use kernel config fragments for disabling dbg and +# improving performance + +local_conf_header: + distro-nodbg: | + DISTRO_NODBG = "YES"We tend to use "0" / "1" for bitbake boolean vars.
Quoted 2 lines
Furthermore, I wonder if we shouldn't switch default to no-debug and explicitly turn debugging on in our CI/testing.
I thought the same. Images generated by xenomai-images are often used as reference images, so I assume they should be "production ready" by default and CI could enable debug builds.
Quoted 5 lines
In any case, some short hint on this control in the README would be good.
Jan