From 2ee70803b36a13ad2a99ffd008f0554f24b2ce30 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Tue, 5 Sep 2017 22:25:34 +0100 Subject: [PATCH] ctf: drop CONFIG_DT_DISABLE_CTF, ctf.ko, and all that it implies Now that CTF is decoupled from the kernel build and built into a separate archive, there is no longer any need to drag around a fake ctf.ko module to contain the shared and built-in CTF info. Drop it, and kernel/ctf/, and the code to autoload it when dtrace.ko is loaded, and move its Kconfig contents into lib/Kconfig (which used to include kernel/ctf/Kconfig). Furthermore, now that CTF is built on demand and not unconditionally built every time the kernel is, there is no longer any need for the speedup hack CONFIG_DT_DISABLE_CTF. Drop it. Signed-off-by: Nick Alcock Reviewed-by: Tomas Jedlicka Reviewed-by: Victor Erminpour Orabug: 25815362 --- dtrace/dtrace_dev.c | 4 ---- kernel/Makefile | 1 - kernel/ctf/Kconfig | 11 ----------- kernel/ctf/Makefile | 7 ------- kernel/ctf/ctf.c | 19 ------------------- kernel/dtrace/Kconfig | 11 +---------- lib/Kconfig | 10 +++++++++- 7 files changed, 10 insertions(+), 53 deletions(-) delete mode 100644 kernel/ctf/Kconfig delete mode 100644 kernel/ctf/Makefile delete mode 100644 kernel/ctf/ctf.c diff --git a/dtrace/dtrace_dev.c b/dtrace/dtrace_dev.c index 6e918c2573e6..994a46493815 100644 --- a/dtrace/dtrace_dev.c +++ b/dtrace/dtrace_dev.c @@ -1417,10 +1417,6 @@ int dtrace_dev_init(void) return rc; } -#if defined(CONFIG_CTF) - ctf_forceload(); -#endif - mutex_lock(&cpu_lock); mutex_lock(&dtrace_provider_lock); mutex_lock(&dtrace_lock); diff --git a/kernel/Makefile b/kernel/Makefile index 70a54501c7a3..6e6e12873c43 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -99,7 +99,6 @@ obj-$(CONFIG_JUMP_LABEL) += jump_label.o obj-$(CONFIG_CONTEXT_TRACKING) += context_tracking.o obj-$(CONFIG_TORTURE_TEST) += torture.o obj-$(CONFIG_DTRACE) += dtrace/ -obj-$(CONFIG_CTF) += ctf/ $(obj)/configs.o: $(obj)/config_data.h diff --git a/kernel/ctf/Kconfig b/kernel/ctf/Kconfig deleted file mode 100644 index 9aa936eaedb2..000000000000 --- a/kernel/ctf/Kconfig +++ /dev/null @@ -1,11 +0,0 @@ -config CTF - bool "Compact Type Format generation" - default n - select STRIP_ASM_SYMS - depends on DEBUG_INFO && !DEBUG_INFO_REDUCED && !DEBUG_INFO_SPLIT && !DEBUG_INFO_DWARF4 && !DT_DISABLE_CTF && DTRACE - help - Emit a compact, compressed description of the kernel's datatypes and - global variables into .ctf sections in kernel modules. A module - 'ctf.ko' is also generated containing type information for built-in - modules, the core kernel, and types shared across multiple kernel - modules. diff --git a/kernel/ctf/Makefile b/kernel/ctf/Makefile deleted file mode 100644 index bd73c5230b9c..000000000000 --- a/kernel/ctf/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# Makefile for Compact Type Format storage -# - -ifdef CONFIG_CTF -obj-m += ctf.o -endif diff --git a/kernel/ctf/ctf.c b/kernel/ctf/ctf.c deleted file mode 100644 index c04812ab6bbc..000000000000 --- a/kernel/ctf/ctf.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * FILE: ctf.c - * DESCRIPTION: Dynamic Tracing: CTF container module - * - * Copyright (C) 2012 Oracle Corporation - */ - -#include - -MODULE_AUTHOR("Nick Alcock "); -MODULE_DESCRIPTION("CTF container module, not for modprobing"); -MODULE_VERSION("v0.2"); -MODULE_LICENSE("GPL"); - -void ctf_forceload(void) { - /* nothing doing */ -} - -EXPORT_SYMBOL(ctf_forceload); diff --git a/kernel/dtrace/Kconfig b/kernel/dtrace/Kconfig index 6f41b2dfbf87..ce77ed14a9c3 100644 --- a/kernel/dtrace/Kconfig +++ b/kernel/dtrace/Kconfig @@ -10,7 +10,7 @@ menuconfig DTRACE select KALLSYMS select KALLMODSYMS select WAITFD - select CTF if (!DT_DISABLE_CTF) + select CTF help The DTrace dynamic tracing framework. @@ -102,15 +102,6 @@ config DT_DEBUG_MUTEX messages whenever a mutex is locked or unlocked within the DTrace code (core and providers). -config DT_DISABLE_CTF - bool "Disable CTF generation" - default n - help - Disables the time-consuming generation of CTF information. This is - quite a time-consuming process and may not always be desirable. - (The modules will still contain CTF sections, but they will be - empty.) - endif # DT_DEBUG endif # DT_CORE diff --git a/lib/Kconfig b/lib/Kconfig index 1788f103b474..2b0e1591002b 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -507,7 +507,15 @@ config LIBFDT # # CTF support is select'ed if needed # -source "kernel/ctf/Kconfig" +config CTF + bool "Compact Type Format generation" + default n + select STRIP_ASM_SYMS + depends on DEBUG_INFO && !DEBUG_INFO_REDUCED && !DEBUG_INFO_SPLIT && !DEBUG_INFO_DWARF4 && DTRACE + help + Emit a compact, compressed description of the kernel's datatypes and + global variables into the vmlinux.ctfa archive (for in-tree modules) + or into .ctf sections in kernel modules (for out-of-tree modules). config OID_REGISTRY tristate -- 2.50.1