Skip to contentSkip to conversation

control applying of no debug fragment

PATCH In review Hongzhan Chen 2 participants 9 messages Jul 28, 2021

lore
Share & tools
lore
#0 lore raw

cover control applying of no debug fragment

1. disable CONFIG_XENO_OPT_DEBUG* in common nodbg fragment.
2. control applying no debug fragment. By default, nodebug switch is off.
3. Add kas option for swithing off debug.

Hongzhan Chen (3):
recipes-kernel/linux: control appyling of no debug config fragment Add kas option for swithing off debug
recipes-kernel: disable more debugs for common nodbg fragment

 README.md                                   |  5 +++++
 opt-set-nodbg.yml                           | 20 ++++++++++++++++++++
 recipes-kernel/linux/files/common_nodbg.cfg |  1 +
 recipes-kernel/linux/linux-xenomai.inc      |  2 ++
 4 files changed, 28 insertions(+)
 create mode 100644 opt-set-nodbg.yml
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/3 recipes-kernel/linux: control appyling of no debug config fragment

By default, nodbg config fragment would not be applied.

---
 recipes-kernel/linux/linux-xenomai.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-kernel/linux/linux-xenomai.inc +2 -0
index 185b60b..5f639df 100644
@@ -12,8 +12,10 @@
 require recipes-kernel/linux/linux-custom.inc
 
 KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"
+DISTRO_NODBG ?= "0"
 
 SRC_URI += "file://${KERNEL_DEFCONFIG}"
+SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('DISTRO_NODBG') == '1' else ''}"
 
 DEPENDS += "xenomai-kernel-source"
 KBUILD_DEPENDS += "xenomai-kernel-source"
Signature · 1 line
2.17.1
#2 lore raw

Re: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 13 lines · Hongzhan Chen via Xenomai

By default, nodbg config fragment would not be applied.

---
 recipes-kernel/linux/linux-xenomai.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-kernel/linux/linux-xenomai.inc +0 -0
index 185b60b..5f639df 100644

recipes-kernel/linux/linux-xenomai.inc line 21

Quoted 10 lines
recipes-kernel/linux/linux-xenomai.inc +2 -0
@@ -12,8 +12,10 @@
 require recipes-kernel/linux/linux-custom.inc
 
 KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"
+DISTRO_NODBG ?= "0"
 
 SRC_URI += "file://${KERNEL_DEFCONFIG}"
+SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('DISTRO_NODBG') == '1' else ''}"
 
 DEPENDS += "xenomai-kernel-source"
 KBUILD_DEPENDS += "xenomai-kernel-source"

As discussed, let's flip the default to no-debug and enable debugging via XENOMAI_DEBUG = "1", I would say.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
#3 lore raw

RE: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 29 lines

-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Wednesday, July 28, 2021 1:52 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 12 lines · Hongzhan Chen via Xenomai

By default, nodbg config fragment would not be applied.

---
 recipes-kernel/linux/linux-xenomai.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-kernel/linux/linux-xenomai.inc +0 -0
index 185b60b..5f639df 100644

recipes-kernel/linux/linux-xenomai.inc line 15

Quoted 4 lines
recipes-kernel/linux/linux-xenomai.inc +1 -0
@@ -12,8 +12,10 @@
 require recipes-kernel/linux/linux-custom.inc
 
 KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"
+DISTRO_NODBG ?= "0"

SRC_URI += "file://${KERNEL_DEFCONFIG}"
+SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('DISTRO_NODBG') == '1' else ''}"

Quoted 6 lines

DEPENDS += "xenomai-kernel-source"
KBUILD_DEPENDS += "xenomai-kernel-source"

As discussed, let's flip the default to no-debug and enable debugging via XENOMAI_DEBUG = "1", I would say.

If CI is using no-debug by default, some smokey tests would fail because they depends on CONFIG_XENO_OPT_DEBUG*. That is what we expect?

Regards

Hongzhan Chen

Quoted 6 lines

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
#4 lore raw

Re: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 33 lines · Hongzhan
Quoted 33 lines

-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Wednesday, July 28, 2021 1:52 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 12 lines · Hongzhan Chen via Xenomai

By default, nodbg config fragment would not be applied.

---
 recipes-kernel/linux/linux-xenomai.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-kernel/linux/linux-xenomai.inc +0 -0
index 185b60b..5f639df 100644

recipes-kernel/linux/linux-xenomai.inc line 15

Quoted 4 lines
recipes-kernel/linux/linux-xenomai.inc +1 -0
@@ -12,8 +12,10 @@
 require recipes-kernel/linux/linux-custom.inc
 
 KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"
+DISTRO_NODBG ?= "0"

SRC_URI += "file://${KERNEL_DEFCONFIG}"
+SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('DISTRO_NODBG') == '1' else ''}"

DEPENDS += "xenomai-kernel-source"
KBUILD_DEPENDS += "xenomai-kernel-source"

Quoted 6 lines
Quoted 2 lines

As discussed, let's flip the default to no-debug and enable debugging via XENOMAI_DEBUG = "1", I would say.

If CI is using no-debug by default, some smokey tests would fail because they depends on CONFIG_XENO_OPT_DEBUG*. That is what we expect?

As discussed, the CI setups would need :opt-debug.yml in addition. They already have some special option to support LAVA needs.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
#5 lore raw

RE: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 44 lines

-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Wednesday, July 28, 2021 2:21 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 35 lines · Hongzhan
Quoted 34 lines

-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Wednesday, July 28, 2021 1:52 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [xenomai-image 1/3] recipes-kernel/linux: control appyling of no debug config fragment

Quoted 12 lines · Hongzhan Chen via Xenomai

By default, nodbg config fragment would not be applied.

---
 recipes-kernel/linux/linux-xenomai.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-kernel/linux/linux-xenomai.inc +0 -0
index 185b60b..5f639df 100644

recipes-kernel/linux/linux-xenomai.inc line 15

Quoted 4 lines
recipes-kernel/linux/linux-xenomai.inc +1 -0
@@ -12,8 +12,10 @@
 require recipes-kernel/linux/linux-custom.inc
 
 KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"
+DISTRO_NODBG ?= "0"

SRC_URI += "file://${KERNEL_DEFCONFIG}"
+SRC_URI += "${@'file://common_nodbg.cfg' if d.getVar('DISTRO_NODBG') == '1' else ''}"

DEPENDS += "xenomai-kernel-source"
KBUILD_DEPENDS += "xenomai-kernel-source"

As discussed, let's flip the default to no-debug and enable debugging via XENOMAI_DEBUG = "1", I would say.

Quoted 6 lines
Quoted 3 lines

If CI is using no-debug by default, some smokey tests would fail because they depends on CONFIG_XENO_OPT_DEBUG*. That is what we expect?

As discussed, the CI setups would need :opt-debug.yml in addition. They already have some special option to support LAVA needs.

OK. I misunderstood something because I thought we would still keep current CI setups.

Quoted 6 lines

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
#6 lore raw

PATCH 2/3 Add kas option for swithing off debug

In reply to Hongzhan Chen

For performance or latency testing and demonstration, debug can be switched off.

---
 README.md         |  5 +++++
 opt-set-nodbg.yml | 20 ++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 opt-set-nodbg.yml
README.md +5 -0
index 004c854..9eb5ad5 100644
@@ -30,6 +30,11 @@ The QEMU ARM64 target is selected by `... kas.yml:board-qemu-arm64.yml` and
 started via `start-qemu.sh arm64`. Make sure to have `qemu-aarch64-system`
 installed.
 
+For performance or latency testing and demonstration, you may want to switch
+off xenomai and linux related debug like this:
+
+    kas-container build kas.yml:board-qemu-amd64.yml:opt-set-nodbg.yml
+
 ### Physical Targets
 
 This repository contains recipes for x86 (`board-x86-64-efi.yml`),
opt-set-nodbg.yml new file +20 -0
new file mode 100644
index 0000000..eaa505d
@@ -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 = "1"
Signature · 1 line
2.17.1
#7 lore raw

PATCH 3/3 recipes-kernel: disable more debugs for common nodbg fragment

In reply to Hongzhan Chen

Disable more debugs for common nodbg fragment to improve performance

---
 recipes-kernel/linux/files/common_nodbg.cfg | 1 +
 1 file changed, 1 insertion(+)
recipes-kernel/linux/files/common_nodbg.cfg +1 -0
index 749799d..d7d87c5 100644
@@ -1 +1,2 @@
 # CONFIG_IPIPE_DEBUG is not set
+# CONFIG_XENO_OPT_DEBUG is not set
Signature · 1 line
2.17.1
#8 lore raw

Re: [xenomai-image 3/3] recipes-kernel: disable more debugs for common nodbg fragment

Quoted 13 lines · Hongzhan Chen via Xenomai

Disable more debugs for common nodbg fragment to improve performance

---
 recipes-kernel/linux/files/common_nodbg.cfg | 1 +
 1 file changed, 1 insertion(+)
recipes-kernel/linux/files/common_nodbg.cfg +0 -0
index 749799d..d7d87c5 100644

recipes-kernel/linux/files/common_nodbg.cfg line 2

Quoted 2 lines
recipes-kernel/linux/files/common_nodbg.cfg +1 -0
@@ -1 +1,2 @@
 # CONFIG_IPIPE_DEBUG is not set
+# CONFIG_XENO_OPT_DEBUG is not set

Added this one to next already, thanks.

Jan

Signature · 2 lines
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux