[PATCH v6 9/9] LoongArch: Enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS

Qing Zhang posted 9 patches 3 years, 1 month ago
There is a newer version of this series
[PATCH v6 9/9] LoongArch: Enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS
Posted by Qing Zhang 3 years, 1 month ago
Defaults enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS to convenient
ftrace tests.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---
 arch/loongarch/configs/loongson3_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
index 2d4678e6189a..0bbab17609b0 100644
--- a/arch/loongarch/configs/loongson3_defconfig
+++ b/arch/loongarch/configs/loongson3_defconfig
@@ -34,6 +34,7 @@ CONFIG_SYSFS_DEPRECATED=y
 CONFIG_RELAY=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_EXPERT=y
+CONFIG_KALLSYMS_ALL=y
 CONFIG_USERFAULTFD=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
@@ -845,6 +846,7 @@ CONFIG_CRYPTO_DEV_VIRTIO=m
 CONFIG_PRINTK_TIME=y
 CONFIG_STRIP_ASM_SYMS=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_FS=y
 # CONFIG_SCHED_DEBUG is not set
 CONFIG_SCHEDSTATS=y
 # CONFIG_DEBUG_PREEMPT is not set
-- 
2.36.0
Re: [PATCH v6 9/9] LoongArch: Enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS
Posted by Huacai Chen 3 years, 1 month ago
Hi, Qing,

I suggest not enabling debug mechanisms in the default config file,
distribution configs can make their own decisions.

Huacai

On Tue, Nov 15, 2022 at 10:55 AM Qing Zhang <zhangqing@loongson.cn> wrote:
>
> Defaults enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS to convenient
> ftrace tests.
>
> Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
> ---
>  arch/loongarch/configs/loongson3_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/loongarch/configs/loongson3_defconfig b/arch/loongarch/configs/loongson3_defconfig
> index 2d4678e6189a..0bbab17609b0 100644
> --- a/arch/loongarch/configs/loongson3_defconfig
> +++ b/arch/loongarch/configs/loongson3_defconfig
> @@ -34,6 +34,7 @@ CONFIG_SYSFS_DEPRECATED=y
>  CONFIG_RELAY=y
>  CONFIG_BLK_DEV_INITRD=y
>  CONFIG_EXPERT=y
> +CONFIG_KALLSYMS_ALL=y
>  CONFIG_USERFAULTFD=y
>  CONFIG_PERF_EVENTS=y
>  # CONFIG_COMPAT_BRK is not set
> @@ -845,6 +846,7 @@ CONFIG_CRYPTO_DEV_VIRTIO=m
>  CONFIG_PRINTK_TIME=y
>  CONFIG_STRIP_ASM_SYMS=y
>  CONFIG_MAGIC_SYSRQ=y
> +CONFIG_DEBUG_FS=y
>  # CONFIG_SCHED_DEBUG is not set
>  CONFIG_SCHEDSTATS=y
>  # CONFIG_DEBUG_PREEMPT is not set
> --
> 2.36.0
>
>
Re: [PATCH v6 9/9] LoongArch: Enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS
Posted by Arnd Bergmann 3 years, 1 month ago
On Tue, Nov 15, 2022, at 09:31, Huacai Chen wrote:
>
> I suggest not enabling debug mechanisms in the default config file,
> distribution configs can make their own decisions.

CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS are rather fundamental, and
are enabled in most other architectures as well. I would recommend
everything that is needed to run on the most common hardware
configurations and that is needed for booting into a general-purpose
distribution, but not much beyond that.

Other options like CONFIG_DEBUG_INFO and CONFIG_DEBUG_KERNEL (including
options based on it) are probably better left disabled though, those
are the ones with a significant runtime or buld-time overhead.

      Arnd
Re: [PATCH v6 9/9] LoongArch: Enable CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS
Posted by Huacai Chen 3 years, 1 month ago
On Tue, Nov 15, 2022 at 4:48 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Nov 15, 2022, at 09:31, Huacai Chen wrote:
> >
> > I suggest not enabling debug mechanisms in the default config file,
> > distribution configs can make their own decisions.
>
> CONFIG_KALLSYMS_ALL and CONFIG_DEBUG_FS are rather fundamental, and
> are enabled in most other architectures as well. I would recommend
> everything that is needed to run on the most common hardware
> configurations and that is needed for booting into a general-purpose
> distribution, but not much beyond that.
>
> Other options like CONFIG_DEBUG_INFO and CONFIG_DEBUG_KERNEL (including
> options based on it) are probably better left disabled though, those
> are the ones with a significant runtime or buld-time overhead.
OK, got it.

Huacai
>
>       Arnd