* [PATCH v4] ftrace: support early boot function tracing
@ 2018-12-06 8:35 Abderrahmane Benbachir
2018-12-09 6:22 ` kbuild test robot
2018-12-09 22:05 ` kbuild test robot
0 siblings, 2 replies; 3+ messages in thread
From: Abderrahmane Benbachir @ 2018-12-06 8:35 UTC (permalink / raw)
To: rostedt; +Cc: linux-kernel, peterz, mingo, mathieu.desnoyers, abderb
Hi Steven,
Thanks for the feedbacks, I've applied your suggestion on this patch version.
Previous changes:
-----------------
PATCH v1: Initial patch
PATCH v2:
Removed arch specific code and use the default clock.
Add more code re-usability
Add HAVE_EARLY_BOOT_FTRACE config option, which will be disabled by default
PATCH v3:
Write early boot temporary buffer to a sub-buffer instead of the global one.
Improve Kconfig help text.
PATCH v4 starts here :
----------------------
The very early tracing will start from the beginning of start_kernel()
and will stop at ftrace_init()
start_kernel()
{
ftrace_early_init() <--- start early boot function tracing
...
(calls)
...
ftrace_init() <--- stop early bootfunction tracing
early_trace_init();
...
}
The events are placed in a temporary buffer, which will be copied to
the trace buffer after memory setup.
Dynamic tracing is not implemented with live patching, we use
ftrace_filter and ftrace_notrace to find which functions to be
filtered (traced / not traced), then during the callback from
mcount hook, we do binary search lookup to decide which function
to be save or not.
Signed-off-by: Abderrahmane Benbachir <abderrahmane.benbachir@polymtl.ca>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: linux-kernel@vger.kernel.org
---
arch/x86/Kconfig | 1 +
arch/x86/kernel/ftrace_32.S | 45 ++++--
arch/x86/kernel/ftrace_64.S | 14 ++
include/linux/ftrace.h | 18 ++-
init/main.c | 1 +
kernel/trace/Kconfig | 51 +++++++
kernel/trace/ftrace.c | 294 +++++++++++++++++++++++++++++++++++-
kernel/trace/trace.c | 41 +++++
8 files changed, 453 insertions(+), 12 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 8689e794a43c..f4f754d4aa7a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -152,6 +152,7 @@ config X86
select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_FUNCTION_TRACER
+ select HAVE_EARLY_BOOT_FTRACE
select HAVE_GCC_PLUGINS
select HAVE_HW_BREAKPOINT
select HAVE_IDE
diff --git a/arch/x86/kernel/ftrace_32.S b/arch/x86/kernel/ftrace_32.S
index 4c8440de3355..a247cbf4c529 100644
--- a/arch/x86/kernel/ftrace_32.S
+++ b/arch/x86/kernel/ftrace_32.S
@@ -31,12 +31,8 @@ EXPORT_SYMBOL(mcount)
# define MCOUNT_FRAME 0 /* using frame = false */
#endif
-ENTRY(function_hook)
- ret
-END(function_hook)
-
-ENTRY(ftrace_caller)
+.macro save_mcount_regs
#ifdef USING_FRAME_POINTER
# ifdef CC_USING_FENTRY
/*
@@ -73,11 +69,9 @@ ENTRY(ftrace_caller)
movl function_trace_op, %ecx
subl $MCOUNT_INSN_SIZE, %eax
+ .endm
-.globl ftrace_call
-ftrace_call:
- call ftrace_stub
-
+.macro restore_mcount_regs
addl $4, %esp /* skip NULL pointer */
popl %edx
popl %ecx
@@ -90,6 +84,39 @@ ftrace_call:
addl $4, %esp /* skip parent ip */
# endif
#endif
+ .endm
+
+ENTRY(function_hook)
+#ifdef CONFIG_EARLY_BOOT_FUNCTION_TRACER
+ cmpl $__PAGE_OFFSET, %esp
+ jb early_boot_stub /* Paging not enabled yet? */
+
+ cmpl $ftrace_stub, ftrace_early_boot_trace_function
+ jnz early_boot_trace
+
+early_boot_stub:
+ ret
+
+early_boot_trace:
+ save_mcount_regs
+ call *ftrace_early_boot_trace_function
+ restore_mcount_regs
+
+ jmp early_boot_stub
+#else
+ ret
+#endif
+END(function_hook)
+
+ENTRY(ftrace_caller)
+ save_mcount_regs
+
+.globl ftrace_call
+ftrace_call:
+ call ftrace_stub
+
+ restore_mcount_regs
+
.Lftrace_ret:
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
.globl ftrace_graph_call
diff --git a/arch/x86/kernel/ftrace_64.S b/arch/x86/kernel/ftrace_64.S
index 91b2cff4b79a..81736c6e2f9b 100644
--- a/arch/x86/kernel/ftrace_64.S
+++ b/arch/x86/kernel/ftrace_64.S
@@ -151,7 +151,21 @@ EXPORT_SYMBOL(mcount)
#ifdef CONFIG_DYNAMIC_FTRACE
ENTRY(function_hook)
+# ifdef CONFIG_EARLY_BOOT_FUNCTION_TRACER
+ cmpq $ftrace_stub, ftrace_early_boot_trace_function
+ jnz early_boot_trace
+
+early_boot_stub:
retq
+
+early_boot_trace:
+ save_mcount_regs
+ call *ftrace_early_boot_trace_function
+ restore_mcount_regs
+ jmp early_boot_stub
+# else
+ retq
+# endif
ENDPROC(function_hook)
ENTRY(ftrace_caller)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index dd16e8218db3..ad68298ca3e0 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -239,6 +239,18 @@ static inline void ftrace_free_init_mem(void) { }
static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { }
#endif /* CONFIG_FUNCTION_TRACER */
+#ifdef CONFIG_EARLY_BOOT_FUNCTION_TRACER
+extern void __init ftrace_early_boot_init(char *command_line);
+extern void __init ftrace_early_boot_shutdown(void);
+extern void __init ftrace_early_boot_fill_ringbuffer(void *data);
+extern inline bool __init is_ftrace_early_boot_activated(void);
+#else
+static inline void __init ftrace_early_boot_init(char *command_line) { }
+static inline void __init ftrace_early_boot_shutdown(void) { }
+static inline void __init ftrace_early_boot_fill_ringbuffer(void *data) { }
+static inline bool __init is_ftrace_early_boot_activated(void) { return false; }
+#endif
+
#ifdef CONFIG_STACK_TRACER
#define STACK_TRACE_ENTRIES 500
@@ -443,6 +455,10 @@ unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec);
extern ftrace_func_t ftrace_trace_function;
+#if defined(CONFIG_EARLY_BOOT_FUNCTION_TRACER) && defined(CONFIG_DYNAMIC_FTRACE)
+extern ftrace_func_t ftrace_early_boot_trace_function;
+#endif
+
int ftrace_regex_open(struct ftrace_ops *ops, int flag,
struct inode *inode, struct file *file);
ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf,
@@ -716,7 +732,7 @@ static inline unsigned long get_lock_parent_ip(void)
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
extern void ftrace_init(void);
#else
-static inline void ftrace_init(void) { }
+static inline void ftrace_init(void) { ftrace_early_shutdown(); }
#endif
/*
diff --git a/init/main.c b/init/main.c
index ee147103ba1b..07b83997b6a7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -539,6 +539,7 @@ asmlinkage __visible void __init start_kernel(void)
char *command_line;
char *after_dashes;
+ ftrace_early_boot_init(boot_command_line);
set_task_stack_end_magic(&init_task);
smp_setup_processor_id();
debug_objects_early_init();
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 5e3de28c7677..e56bb2d4c395 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -19,6 +19,11 @@ config HAVE_FUNCTION_TRACER
help
See Documentation/trace/ftrace-design.rst
+config HAVE_EARLY_BOOT_FTRACE
+ bool
+ help
+ See Documentation/trace/ftrace-design.txt
+
config HAVE_FUNCTION_GRAPH_TRACER
bool
help
@@ -155,6 +160,52 @@ config FUNCTION_TRACER
(the bootup default), then the overhead of the instructions is very
small and not measurable even in micro-benchmarks.
+config EARLY_BOOT_FUNCTION_TRACER
+ bool "Early Boot Kernel Function Tracer"
+ depends on FUNCTION_TRACER
+ depends on HAVE_EARLY_BOOT_FTRACE
+ help
+ Normally, function tracing can only start after memory has been
+ initialized early in boot. If "ftrace=function" is added to the
+ command line, then function tracing will start after memory setup.
+ In order to trace functions before that, this option will
+ have function tracing start before memory setup is complete, by
+ placing the trace in a temporary buffer, which will be copied to
+ the trace buffer after memory setup. The size of this temporary
+ buffer is defined by EARLY_BOOT_FTRACE_BUF_SHIFT.
+
+config EARLY_BOOT_FTRACE_BUF_SHIFT
+ int "Temporary buffer size (17 => 128 KB, 24 => 16 MB)"
+ depends on EARLY_BOOT_FUNCTION_TRACER
+ range 8 24
+ default 19
+ help
+ Select the size of the buffer to be used for storing function calls at
+ early boot stage.
+ The value defines the size as a power of 2, must be in a range of 8 to 24.
+ Examples:
+ 20 => 1 MB
+ 19 => 512 KB
+ 17 => 128 KB
+
+config EARLY_BOOT_FTRACE_FILTER_SHIFT
+ int "Temporary filter size (filter/notrace) (17 => 128 KB, 19 => 512 KB)"
+ depends on EARLY_BOOT_FUNCTION_TRACER
+ depends on FTRACE_MCOUNT_RECORD
+ range 0 19
+ default 17
+ help
+ Select the size of the filter buffer to be used for filtering (trace/
+ no trace) functions at early boot stage.
+ Two buffers (trace and no_trace) will be created using this option.
+ These following kernel parameters control filtering during bootup :
+ "ftrace_filter", "ftrace_notrace".
+ The value defines the size as a power of 2, must be in a range of 0 to 19.
+ Examples:
+ 19 => 512 KB for each buffer
+ 18 => 256 KB for each buffer
+ 17 => 128 KB for each buffer
+
config FUNCTION_GRAPH_TRACER
bool "Kernel Function Graph Tracer"
depends on HAVE_FUNCTION_GRAPH_TRACER
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 77734451cb05..6d2c00f08f13 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -65,6 +65,11 @@
#define FTRACE_HASH_DEFAULT_BITS 10
#define FTRACE_HASH_MAX_BITS 12
+#ifdef CONFIG_FTRACE_MCOUNT_RECORD
+extern unsigned long __start_mcount_loc[];
+extern unsigned long __stop_mcount_loc[];
+#endif
+
#ifdef CONFIG_DYNAMIC_FTRACE
#define INIT_OPS_HASH(opsname) \
.func_hash = &opsname.local_hash, \
@@ -6126,11 +6131,11 @@ void __init ftrace_free_init_mem(void)
void __init ftrace_init(void)
{
- extern unsigned long __start_mcount_loc[];
- extern unsigned long __stop_mcount_loc[];
unsigned long count, flags;
int ret;
+ ftrace_early_boot_shutdown();
+
local_irq_save(flags);
ret = ftrace_dyn_arch_init();
local_irq_restore(flags);
@@ -7095,3 +7100,288 @@ void ftrace_graph_exit_task(struct task_struct *t)
kfree(ret_stack);
}
#endif
+
+
+#ifdef CONFIG_EARLY_BOOT_FUNCTION_TRACER
+
+#define EARLY_BOOT_BUFF_LEN ((1 << CONFIG_EARLY_BOOT_FTRACE_BUF_SHIFT) / \
+ sizeof(struct ftrace_early_boot_entry))
+
+struct ftrace_early_boot_entry {
+ unsigned long ip;
+ unsigned long parent_ip;
+ unsigned long long timestamp;
+};
+/*
+ * Only CPU0 is running in early stage, no need to have per-cpu buffer
+ */
+static struct ftrace_early_boot_entry ftrace_early_boot_entries[EARLY_BOOT_BUFF_LEN] __initdata;
+static const unsigned long EARLY_BOOT_BUFF_MAX __initconst = EARLY_BOOT_BUFF_LEN;
+static unsigned long early_boot_entries_count __initdata;
+static char tmp_cmdline[COMMAND_LINE_SIZE] __initdata;
+static bool ftrace_early_boot_activated __initdata = false;
+
+#ifdef CONFIG_DYNAMIC_FTRACE
+ftrace_func_t ftrace_early_boot_trace_function __read_mostly = ftrace_stub;
+#else
+# define ftrace_early_boot_trace_function ftrace_trace_function
+#endif
+
+inline bool __init is_ftrace_early_boot_activated(void)
+{
+ return ftrace_early_boot_activated;
+}
+
+static inline __init void ftrace_early_boot_disable(void)
+{
+ ftrace_early_boot_trace_function = ftrace_stub;
+}
+
+#ifdef CONFIG_FTRACE_MCOUNT_RECORD
+#define EARLY_BOOT_FILTER_LEN ((1 << CONFIG_EARLY_BOOT_FTRACE_FILTER_SHIFT) / \
+ sizeof(unsigned long))
+
+struct ftrace_early_boot_filtering {
+ unsigned long list[EARLY_BOOT_FILTER_LEN];
+ char buf[COMMAND_LINE_SIZE];
+ int size;
+};
+
+static const unsigned long EARLY_BOOT_FILTER_MAX __initconst = EARLY_BOOT_FILTER_LEN;
+static struct ftrace_early_boot_filtering ftrace_data_notrace __initdata;
+static struct ftrace_early_boot_filtering ftrace_data_filter __initdata;
+
+static __init int ftrace_early_boot_filter_has_addr(unsigned long addr,
+ unsigned long *filter, int *size)
+{
+ int i;
+
+ for (i = 0; i < *size; i++) {
+ if (filter[i] == addr)
+ return 1;
+ }
+ return 0;
+}
+
+static __init int
+ftrace_early_boot_match_record(unsigned long ip, struct ftrace_glob *func_g)
+{
+ char str[KSYM_SYMBOL_LEN];
+ char *modname;
+
+ kallsyms_lookup(ip, NULL, NULL, &modname, str);
+ return ftrace_match(str, func_g);
+}
+
+static __init void
+ftrace_early_boot_regex(char *func, unsigned long *filter, int *size)
+{
+ struct ftrace_glob func_g = { .type = MATCH_FULL };
+ unsigned long *start = __start_mcount_loc;
+ unsigned long *end = __stop_mcount_loc;
+ unsigned long count;
+ unsigned long addr;
+ unsigned long *p;
+ int clear_filter = 0;
+
+ count = end - start;
+
+ if (!count)
+ return;
+
+ if (func) {
+ func_g.type = filter_parse_regex(func, strlen(func), &func_g.search,
+ &clear_filter);
+ func_g.len = strlen(func_g.search);
+ }
+
+ p = start;
+ while (p < end) {
+ addr = ftrace_call_adjust(*p++);
+ if (!addr)
+ continue;
+
+ if ((*size) > EARLY_BOOT_FILTER_MAX)
+ return;
+
+ if (ftrace_early_boot_match_record(addr, &func_g)) {
+ if (!ftrace_early_boot_filter_has_addr(addr, filter, size))
+ filter[(*size)++] = addr;
+ }
+ }
+}
+
+static __init int ftrace_addr_compare(const void *a, const void *b)
+{
+ if (*(unsigned long *)a > *(unsigned long *)b)
+ return 1;
+ if (*(unsigned long *)a < *(unsigned long *)b)
+ return -1;
+
+ return 0;
+}
+
+static __init void ftrace_addr_swap(void *a, void *b, int size)
+{
+ unsigned long t = *(unsigned long *)a;
+ *(unsigned long *)a = *(unsigned long *)b;
+ *(unsigned long *)b = t;
+}
+
+static __init int set_ftrace_early_boot_filtering(void *data, char *str)
+{
+ struct ftrace_early_boot_filtering *ftrace_data = data;
+ char *func;
+ char *buf;
+
+ if (!ftrace_data)
+ return 0;
+ buf = ftrace_data->buf;
+ strlcpy(buf, str, COMMAND_LINE_SIZE);
+
+ while (buf) {
+ func = strsep(&buf, ",");
+ ftrace_early_boot_regex(func, ftrace_data->list, &ftrace_data->size);
+ }
+ /* sort filter to use binary search on it */
+ sort(ftrace_data->list, ftrace_data->size,
+ sizeof(unsigned long), ftrace_addr_compare, ftrace_addr_swap);
+
+ return 1;
+}
+
+#define ftrace_early_boot_bsearch_addr(addr, data) bsearch(&addr, data.list,\
+ data.size, sizeof(unsigned long), ftrace_addr_compare)
+
+#endif /* CONFIG_FTRACE_MCOUNT_RECORD */
+
+
+static __init void
+ftrace_function_early_boot_trace_call(unsigned long ip, unsigned long parent_ip,
+ struct ftrace_ops *op, struct pt_regs *regs)
+{
+ struct ftrace_early_boot_entry *entry;
+
+#ifdef CONFIG_FTRACE_MCOUNT_RECORD
+ if (ftrace_data_notrace.size &&
+ ftrace_early_boot_bsearch_addr(ip, ftrace_data_notrace))
+ return;
+
+ if (ftrace_data_filter.size &&
+ !ftrace_early_boot_bsearch_addr(ip, ftrace_data_filter))
+ return;
+#endif
+
+ if (early_boot_entries_count >= EARLY_BOOT_BUFF_MAX) {
+ /* stop tracing when buffer is full */
+ ftrace_early_boot_disable();
+ return;
+ }
+
+ entry = &ftrace_early_boot_entries[early_boot_entries_count++];
+ entry->ip = ip;
+ entry->parent_ip = parent_ip;
+ entry->timestamp = trace_clock_local();
+}
+
+/*
+ * this will be used as __setup_param
+ */
+struct ftrace_early_boot_obs_param {
+ int (*setup_func)(void *data, char *str);
+ const char *str;
+ void *data;
+};
+static struct ftrace_early_boot_obs_param ftrace_early_boot_params[] __initdata = {
+#ifdef CONFIG_FTRACE_MCOUNT_RECORD
+ {
+ .str = "ftrace_notrace",
+ .data = &ftrace_data_notrace,
+ .setup_func = set_ftrace_early_boot_filtering,
+ },
+ {
+ .str = "ftrace_filter",
+ .data = &ftrace_data_filter,
+ .setup_func = set_ftrace_early_boot_filtering,
+ },
+#endif
+};
+
+static __init int ftrace_do_early_boot_param(char *param, char *val,
+ const char *unused, void *arg)
+{
+ int size = ARRAY_SIZE(ftrace_early_boot_params);
+ struct ftrace_early_boot_obs_param *p;
+ int i;
+
+ for (i = 0; i < size; i++) {
+ p = &ftrace_early_boot_params[i];
+ if (strcmp(param, p->str) == 0) {
+ p->setup_func(p->data, val);
+ return 0;
+ }
+ }
+ return 0;
+}
+
+void __init ftrace_early_boot_init(char *command_line)
+{
+ /* proceed only if function tracing was enabled */
+ if (!strstr(command_line, "ftrace=function "))
+ return;
+
+ strlcpy(tmp_cmdline, command_line, COMMAND_LINE_SIZE);
+ parse_args("ftrace early boot options", tmp_cmdline, NULL, 0, 0, 0, NULL,
+ ftrace_do_early_boot_param);
+
+ ftrace_early_boot_activated = true;
+ // After this point, we enable early function tracing
+ ftrace_early_boot_trace_function = ftrace_function_early_boot_trace_call;
+}
+
+void __init ftrace_early_boot_shutdown(void)
+{
+ // Disable early tracing
+ ftrace_early_boot_disable();
+
+#ifdef CONFIG_FTRACE_MCOUNT_RECORD
+ pr_info("ftrace: early boot %lu entries, notrace=%d, filter=%d",
+ early_boot_entries_count,
+ ftrace_data_notrace.size,
+ ftrace_data_filter.size);
+#else
+ pr_info("ftrace: early boot %lu recorded entries", early_boot_entries_count);
+#endif
+}
+
+/*
+ * Will be passed to ringbuffer by early_boot_trace_clock
+ */
+static u64 early_timestamp __initdata;
+
+static __init u64 early_boot_trace_clock(void)
+{
+ return early_timestamp;
+}
+
+void __init ftrace_early_boot_fill_ringbuffer(void *data)
+{
+ struct ftrace_early_boot_entry *entry;
+ struct trace_array *tr = data;
+ int i;
+
+ if (ftrace_early_boot_entries <= 0)
+ return;
+
+ ring_buffer_set_clock(tr->trace_buffer.buffer, early_boot_trace_clock);
+
+ for (i = 0; i < early_boot_entries_count; i++) {
+ entry = &ftrace_early_boot_entries[i];
+ early_timestamp = entry->timestamp;
+ trace_function(tr, entry->ip, entry->parent_ip, 0, 0);
+ }
+
+ ring_buffer_set_clock(tr->trace_buffer.buffer, trace_clock_local);
+}
+
+#endif /* CONFIG_EARLY_BOOT_FUNCTION_TRACER */
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ff1c4b20cd0a..596ee5dcf108 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -8649,3 +8649,44 @@ __init static int tracing_set_default_clock(void)
}
late_initcall_sync(tracing_set_default_clock);
#endif
+
+#ifdef CONFIG_EARLY_BOOT_FUNCTION_TRACER
+/*
+ * The early boot tracer should be the second trace array added,
+ */
+static __init struct trace_array *early_boot_trace_array(void)
+{
+ struct trace_array *tr;
+
+ if (list_empty(&ftrace_trace_arrays))
+ return NULL;
+
+ tr = list_entry(ftrace_trace_arrays.next,
+ typeof(*tr), list);
+ WARN_ON(!(tr->flags & TRACE_ARRAY_FL_GLOBAL));
+ return tr;
+}
+
+static __init int early_boot_tracer_init_tracefs(void)
+{
+ struct trace_array *tr;
+
+ if (!is_ftrace_early_boot_activated())
+ return 0;
+
+ if (instance_mkdir("early_boot"))
+ return 0;
+
+ tr = early_boot_trace_array();
+ if (!tr) {
+ pr_info("ftrace: early_boot array tracer not found\n");
+ return 0;
+ }
+ /* fill the ring buffer with early boot events */
+ ftrace_early_boot_fill_ringbuffer(tr);
+
+ return 0;
+}
+
+fs_initcall(early_boot_tracer_init_tracefs);
+#endif /* CONFIG_EARLY_BOOT_FUNCTION_TRACER */
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] ftrace: support early boot function tracing
2018-12-06 8:35 [PATCH v4] ftrace: support early boot function tracing Abderrahmane Benbachir
@ 2018-12-09 6:22 ` kbuild test robot
2018-12-09 22:05 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2018-12-09 6:22 UTC (permalink / raw)
To: Abderrahmane Benbachir
Cc: kbuild-all, rostedt, linux-kernel, peterz, mingo,
mathieu.desnoyers, abderb
[-- Attachment #1: Type: text/plain, Size: 25543 bytes --]
Hi Abderrahmane,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.20-rc5 next-20181207]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Abderrahmane-Benbachir/ftrace-support-early-boot-function-tracing/20181209-130427
config: i386-randconfig-x005-201849 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from include/trace/events/qdisc.h:10:0,
from net/sched/sch_generic.c:34:
include/linux/ftrace.h: In function 'ftrace_init':
>> include/linux/ftrace.h:735:40: error: implicit declaration of function 'ftrace_early_shutdown'; did you mean 'ftrace_early_boot_shutdown'? [-Werror=implicit-function-declaration]
static inline void ftrace_init(void) { ftrace_early_shutdown(); }
^~~~~~~~~~~~~~~~~~~~~
ftrace_early_boot_shutdown
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit
Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:clear_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_set_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_clear_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
Cyclomatic Complexity 1 include/linux/list.h:__list_add_valid
Cyclomatic Complexity 1 include/linux/list.h:__list_del_entry_valid
Cyclomatic Complexity 2 include/linux/list.h:__list_add
Cyclomatic Complexity 1 include/linux/list.h:list_add
Cyclomatic Complexity 1 include/linux/list.h:__list_del
Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
Cyclomatic Complexity 1 include/linux/list.h:list_del
Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_set
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_inc
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_read
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_set
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_inc
Cyclomatic Complexity 2 include/linux/thread_info.h:test_ti_thread_flag
Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_add
Cyclomatic Complexity 1 include/linux/bottom_half.h:__local_bh_disable_ip
Cyclomatic Complexity 1 include/linux/bottom_half.h:local_bh_disable
Cyclomatic Complexity 1 include/linux/bottom_half.h:local_bh_enable
Cyclomatic Complexity 1 include/asm-generic/qspinlock.h:queued_spin_is_locked
Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock_bh
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_bh
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore
Cyclomatic Complexity 1 include/linux/spinlock.h:spin_is_locked
Cyclomatic Complexity 1 include/linux/seqlock.h:__seqcount_init
Cyclomatic Complexity 1 include/linux/seqlock.h:raw_read_seqcount
Cyclomatic Complexity 1 include/linux/seqlock.h:raw_write_seqcount_begin
Cyclomatic Complexity 1 include/linux/seqlock.h:raw_write_seqcount_end
Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_begin_nested
Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_begin
Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_end
Cyclomatic Complexity 1 include/linux/rcupdate.h:call_rcu_bh
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_barrier_bh
Cyclomatic Complexity 1 include/linux/timer.h:timer_pending
Cyclomatic Complexity 1 include/linux/refcount.h:refcount_set
Cyclomatic Complexity 1 arch/x86/include/asm/refcount.h:refcount_inc
Cyclomatic Complexity 1 arch/x86/include/asm/refcount.h:refcount_dec_and_test
Cyclomatic Complexity 1 include/linux/module.h:module_is_live
Cyclomatic Complexity 3 include/linux/module.h:try_module_get
Cyclomatic Complexity 1 include/linux/module.h:module_put
Cyclomatic Complexity 1 include/linux/sched.h:need_resched
Cyclomatic Complexity 1 include/linux/dynamic_queue_limits.h:dql_avail
Cyclomatic Complexity 1 include/linux/kasan.h:kasan_kmalloc
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_type
Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
Cyclomatic Complexity 1 include/linux/slab.h:__kmalloc_node
Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_node
Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_trace
Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_node_trace
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large
Cyclomatic Complexity 4 include/linux/slab.h:kmalloc
Cyclomatic Complexity 4 include/linux/slab.h:kmalloc_node
Cyclomatic Complexity 4 include/linux/slab.h:kmalloc_array
Cyclomatic Complexity 1 include/linux/slab.h:kzalloc_node
Cyclomatic Complexity 1 include/linux/mm.h:kvmalloc
Cyclomatic Complexity 2 include/linux/mm.h:kvmalloc_array
Cyclomatic Complexity 1 include/linux/skbuff.h:skb_end_pointer
Cyclomatic Complexity 1 include/linux/skbuff.h:skb_mark_not_on_list
Cyclomatic Complexity 1 include/linux/skbuff.h:skb_queue_empty
Cyclomatic Complexity 2 include/linux/skbuff.h:skb_peek
Cyclomatic Complexity 1 include/linux/skbuff.h:__skb_queue_head_init
Cyclomatic Complexity 1 include/linux/skbuff.h:__skb_insert
Cyclomatic Complexity 1 include/linux/skbuff.h:__skb_queue_before
Cyclomatic Complexity 1 include/linux/skbuff.h:__skb_queue_tail
Cyclomatic Complexity 1 include/linux/skbuff.h:__skb_unlink
Cyclomatic Complexity 2 include/linux/skbuff.h:__skb_dequeue
Cyclomatic Complexity 1 include/linux/skbuff.h:skb_get_queue_mapping
Cyclomatic Complexity 1 include/linux/skbuff.h:skb_is_gso
Cyclomatic Complexity 1 include/linux/u64_stats_sync.h:u64_stats_init
Cyclomatic Complexity 1 include/linux/u64_stats_sync.h:u64_stats_update_begin
Cyclomatic Complexity 1 include/linux/u64_stats_sync.h:u64_stats_update_end
Cyclomatic Complexity 2 include/linux/netdevice.h:dev_xmit_complete
Cyclomatic Complexity 1 include/linux/netdevice.h:netdev_queue_numa_node_read
Cyclomatic Complexity 1 include/linux/netdevice.h:netdev_get_tx_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:skb_get_tx_queue
Cyclomatic Complexity 2 include/linux/netdevice.h:netdev_for_each_tx_queue
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_xmit_stopped
Cyclomatic Complexity 1 include/linux/netdevice.h:netif_xmit_frozen_or_stopped
--
In file included from include/linux/perf_event.h:48:0,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from init/do_mounts.h:5,
from init/do_mounts.c:26:
include/linux/ftrace.h: In function 'ftrace_init':
>> include/linux/ftrace.h:735:40: error: implicit declaration of function 'ftrace_early_shutdown'; did you mean 'ftrace_early_boot_shutdown'? [-Werror=implicit-function-declaration]
static inline void ftrace_init(void) { ftrace_early_shutdown(); }
^~~~~~~~~~~~~~~~~~~~~
ftrace_early_boot_shutdown
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_set_bit
Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_dec_and_test
Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_dec_and_test
Cyclomatic Complexity 1 arch/x86/include/asm/topology.h:numa_node_id
Cyclomatic Complexity 1 include/linux/topology.h:numa_mem_id
Cyclomatic Complexity 1 include/linux/gfp.h:__alloc_pages
Cyclomatic Complexity 1 include/linux/gfp.h:__alloc_pages_node
Cyclomatic Complexity 2 include/linux/gfp.h:alloc_pages_node
Cyclomatic Complexity 1 include/linux/ctype.h:isdigit
Cyclomatic Complexity 1 include/linux/kdev_t.h:new_decode_dev
Cyclomatic Complexity 1 include/linux/fs.h:sb_rdonly
Cyclomatic Complexity 2 include/linux/page-flags.h:compound_head
Cyclomatic Complexity 1 include/linux/page_ref.h:page_ref_dec_and_test
Cyclomatic Complexity 1 include/linux/mm.h:put_page_testzero
Cyclomatic Complexity 1 include/linux/mm.h:put_devmap_managed_page
Cyclomatic Complexity 3 include/linux/mm.h:put_page
Cyclomatic Complexity 1 include/linux/delay.h:ssleep
Cyclomatic Complexity 1 include/linux/genhd.h:printk_all_partitions
Cyclomatic Complexity 1 include/linux/genhd.h:blk_lookup_devt
Cyclomatic Complexity 1 init/do_mounts.h:rd_load_disk
Cyclomatic Complexity 1 init/do_mounts.h:md_run_setup
Cyclomatic Complexity 2 init/do_mounts.c:readonly
Cyclomatic Complexity 2 init/do_mounts.c:readwrite
Cyclomatic Complexity 2 init/do_mounts.c:rootwait_setup
Cyclomatic Complexity 1 init/do_mounts.c:root_data_setup
Cyclomatic Complexity 1 init/do_mounts.c:fs_names_setup
Cyclomatic Complexity 3 init/do_mounts.c:rootfs_mount
Cyclomatic Complexity 1 init/do_mounts.c:load_ramdisk
Cyclomatic Complexity 1 init/do_mounts.c:root_delay_setup
Cyclomatic Complexity 23 init/do_mounts.c:name_to_dev_t
Cyclomatic Complexity 1 init/do_mounts.c:root_dev_setup
Cyclomatic Complexity 7 init/do_mounts.c:get_fs_names
Cyclomatic Complexity 3 init/do_mounts.c:do_mount_root
Cyclomatic Complexity 6 init/do_mounts.c:init_rootfs
Cyclomatic Complexity 4 init/do_mounts.c:mount_block_root
Cyclomatic Complexity 1 init/do_mounts.c:mount_root
Cyclomatic Complexity 14 init/do_mounts.c:prepare_namespace
cc1: some warnings being treated as errors
--
In file included from include/linux/perf_event.h:48:0,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from init/do_mounts.h:5,
from init/do_mounts_initrd.c:12:
include/linux/ftrace.h: In function 'ftrace_init':
>> include/linux/ftrace.h:735:40: error: implicit declaration of function 'ftrace_early_shutdown'; did you mean 'ftrace_early_boot_shutdown'? [-Werror=implicit-function-declaration]
static inline void ftrace_init(void) { ftrace_early_shutdown(); }
^~~~~~~~~~~~~~~~~~~~~
ftrace_early_boot_shutdown
Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
Cyclomatic Complexity 1 include/linux/kdev_t.h:new_encode_dev
Cyclomatic Complexity 1 include/linux/kdev_t.h:new_decode_dev
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_unlink
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_mkdir
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_mknod
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_close
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_open
Cyclomatic Complexity 1 init/do_mounts.h:create_dev
Cyclomatic Complexity 1 init/do_mounts.h:rd_load_image
Cyclomatic Complexity 1 init/do_mounts_initrd.c:no_initrd
Cyclomatic Complexity 7 init/do_mounts_initrd.c:handle_initrd
Cyclomatic Complexity 1 init/do_mounts_initrd.c:init_linuxrc
Cyclomatic Complexity 4 init/do_mounts_initrd.c:initrd_load
cc1: some warnings being treated as errors
--
In file included from include/linux/perf_event.h:48:0,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from init/initramfs.c:10:
include/linux/ftrace.h: In function 'ftrace_init':
>> include/linux/ftrace.h:735:40: error: implicit declaration of function 'ftrace_early_shutdown'; did you mean 'ftrace_early_boot_shutdown'? [-Werror=implicit-function-declaration]
static inline void ftrace_init(void) { ftrace_early_shutdown(); }
^~~~~~~~~~~~~~~~~~~~~
ftrace_early_boot_shutdown
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
Cyclomatic Complexity 2 arch/x86/include/asm/jump_label.h:arch_static_branch
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
Cyclomatic Complexity 1 include/linux/list.h:__list_add_valid
Cyclomatic Complexity 1 include/linux/list.h:__list_del_entry_valid
Cyclomatic Complexity 2 include/linux/list.h:__list_add
Cyclomatic Complexity 1 include/linux/list.h:list_add
Cyclomatic Complexity 1 include/linux/list.h:__list_del
Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
Cyclomatic Complexity 1 include/linux/list.h:list_del
Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
Cyclomatic Complexity 1 include/linux/kdev_t.h:new_encode_dev
Cyclomatic Complexity 1 include/linux/fs.h:vfs_lstat
Cyclomatic Complexity 1 include/linux/kasan.h:kasan_kmalloc
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_type
Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_trace
Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large
Cyclomatic Complexity 4 include/linux/slab.h:kmalloc
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_unlink
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_rmdir
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_mkdir
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_symlink
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_mknod
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_link
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_chmod
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_chown
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_lchown
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_ftruncate
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_close
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_open
Cyclomatic Complexity 2 init/initramfs.c:error
Cyclomatic Complexity 1 init/initramfs.c:hash
Cyclomatic Complexity 1 init/initramfs.c:eat
Cyclomatic Complexity 2 init/initramfs.c:read_into
Cyclomatic Complexity 1 init/initramfs.c:do_start
Cyclomatic Complexity 2 init/initramfs.c:do_skip
Cyclomatic Complexity 5 init/initramfs.c:do_reset
Cyclomatic Complexity 4 init/initramfs.c:clean_path
Cyclomatic Complexity 2 init/initramfs.c:write_buffer
Cyclomatic Complexity 6 init/initramfs.c:flush_buffer
Cyclomatic Complexity 2 init/initramfs.c:retain_initrd_param
Cyclomatic Complexity 3 init/initramfs.c:free_hash
Cyclomatic Complexity 1 init/initramfs.c:do_utime
Cyclomatic Complexity 1 init/initramfs.c:do_symlink
Cyclomatic Complexity 2 init/initramfs.c:dir_utime
Cyclomatic Complexity 14 init/initramfs.c:unpack_to_rootfs
Cyclomatic Complexity 6 init/initramfs.c:xwrite
Cyclomatic Complexity 4 init/initramfs.c:do_copy
Cyclomatic Complexity 1 init/initramfs.c:dir_add
Cyclomatic Complexity 3 init/initramfs.c:do_collect
Cyclomatic Complexity 6 init/initramfs.c:find_link
Cyclomatic Complexity 4 init/initramfs.c:maybe_link
Cyclomatic Complexity 12 init/initramfs.c:do_name
Cyclomatic Complexity 2 init/initramfs.c:parse_header
Cyclomatic Complexity 8 init/initramfs.c:do_header
Cyclomatic Complexity 2 init/initramfs.c:free_initrd
Cyclomatic Complexity 3 init/initramfs.c:populate_rootfs
cc1: some warnings being treated as errors
--
In file included from include/linux/init_task.h:9:0,
from init/init_task.c:2:
include/linux/ftrace.h: In function 'ftrace_init':
>> include/linux/ftrace.h:735:40: error: implicit declaration of function 'ftrace_early_shutdown'; did you mean 'ftrace_early_boot_shutdown'? [-Werror=implicit-function-declaration]
static inline void ftrace_init(void) { ftrace_early_shutdown(); }
^~~~~~~~~~~~~~~~~~~~~
ftrace_early_boot_shutdown
cc1: some warnings being treated as errors
--
In file included from include/linux/perf_event.h:48:0,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from init/main.c:20:
include/linux/ftrace.h: In function 'ftrace_init':
>> include/linux/ftrace.h:735:40: error: implicit declaration of function 'ftrace_early_shutdown'; did you mean 'ftrace_early_boot_shutdown'? [-Werror=implicit-function-declaration]
static inline void ftrace_init(void) { ftrace_early_shutdown(); }
^~~~~~~~~~~~~~~~~~~~~
ftrace_early_boot_shutdown
Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
Cyclomatic Complexity 1 include/linux/compiler.h:offset_to_ptr
Cyclomatic Complexity 1 include/linux/init.h:initcall_from_entry
Cyclomatic Complexity 2 arch/x86/include/asm/jump_label.h:arch_static_branch
Cyclomatic Complexity 1 include/linux/list.h:__list_add_valid
Cyclomatic Complexity 2 include/linux/list.h:__list_add
Cyclomatic Complexity 1 include/linux/list.h:list_add
Cyclomatic Complexity 1 include/linux/list.h:list_empty
Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
Cyclomatic Complexity 1 include/linux/string.h:strtobool
Cyclomatic Complexity 1 include/linux/bitmap.h:bitmap_zero
Cyclomatic Complexity 1 include/linux/cpumask.h:cpumask_clear
Cyclomatic Complexity 1 include/linux/cpumask.h:get_cpu_mask
Cyclomatic Complexity 1 arch/x86/include/asm/msr.h:rdtsc
Cyclomatic Complexity 3 include/linux/err.h:IS_ERR_OR_NULL
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:native_save_fl
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:native_irq_disable
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:native_irq_enable
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:arch_local_save_flags
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:arch_local_irq_disable
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:arch_local_irq_enable
Cyclomatic Complexity 1 arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:preempt_count
Cyclomatic Complexity 2 arch/x86/include/asm/preempt.h:preempt_count_set
Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_add
Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_sub
Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_lock
Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_unlock
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_init_nohz
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_acquire
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_release
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_lock
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_unlock
Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_barrier_sched
Cyclomatic Complexity 1 include/linux/ktime.h:ktime_to_ns
Cyclomatic Complexity 1 include/linux/mmzone.h:pfn_to_section_nr
Cyclomatic Complexity 2 include/linux/mmzone.h:__nr_to_section
Cyclomatic Complexity 1 include/linux/mmzone.h:__section_mem_map_addr
Cyclomatic Complexity 1 include/linux/mmzone.h:__pfn_to_section
Cyclomatic Complexity 1 arch/x86/include/asm/smp.h:smp_prepare_boot_cpu
Cyclomatic Complexity 1 arch/x86/include/asm/smp.h:smp_prepare_cpus
Cyclomatic Complexity 1 include/linux/umh.h:usermodehelper_enable
Cyclomatic Complexity 1 include/linux/mm_types.h:mm_init_cpumask
Cyclomatic Complexity 1 include/linux/sched.h:task_pid
Cyclomatic Complexity 1 include/linux/sched.h:task_pid_nr
Cyclomatic Complexity 1 include/linux/page_ext.h:page_ext_init_flatmem
Cyclomatic Complexity 1 arch/x86/include/asm/pgtable_32.h:pgtable_cache_init
Cyclomatic Complexity 1 include/asm-generic/pgtable.h:init_espfix_bsp
Cyclomatic Complexity 1 include/linux/mm.h:page_to_section
Cyclomatic Complexity 1 include/linux/mm.h:pgtable_init
Cyclomatic Complexity 1 include/linux/ftrace.h:trace_init
Cyclomatic Complexity 1 include/linux/ftrace.h:early_trace_init
Cyclomatic Complexity 1 include/linux/ftrace.h:ftrace_free_init_mem
Cyclomatic Complexity 1 include/linux/ftrace.h:ftrace_early_boot_init
Cyclomatic Complexity 1 include/linux/ftrace.h:ftrace_init
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_access
Cyclomatic Complexity 1 include/linux/syscalls.h:ksys_open
Cyclomatic Complexity 1 include/linux/random.h:add_latent_entropy
Cyclomatic Complexity 1 arch/x86/include/asm/stackprotector.h:boot_init_stack_canary
Cyclomatic Complexity 1 include/linux/memblock.h:memblock_alloc
Cyclomatic Complexity 1 include/linux/io.h:ioremap_huge_init
Cyclomatic Complexity 1 include/linux/security.h:security_init
Cyclomatic Complexity 1 include/linux/profile.h:profile_init
Cyclomatic Complexity 1 include/linux/cpuset.h:cpuset_init
Cyclomatic Complexity 1 include/linux/cpuset.h:cpuset_init_smp
Cyclomatic Complexity 1 include/linux/cpuset.h:set_mems_allowed
Cyclomatic Complexity 1 include/linux/efi.h:efi_enabled
Cyclomatic Complexity 1 include/linux/taskstats_kern.h:taskstats_init_early
Cyclomatic Complexity 1 include/linux/delayacct.h:delayacct_init
Cyclomatic Complexity 1 include/linux/utsname.h:uts_ns_init
Cyclomatic Complexity 1 include/linux/mempolicy.h:numa_policy_init
Cyclomatic Complexity 1 include/linux/mempolicy.h:numa_default_policy
Cyclomatic Complexity 1 include/linux/buffer_head.h:buffer_init
Cyclomatic Complexity 1 include/linux/kmemleak.h:kmemleak_init
Cyclomatic Complexity 1 include/linux/pti.h:pti_init
Cyclomatic Complexity 1 include/linux/pti.h:pti_finalize
Cyclomatic Complexity 1 include/linux/elevator.h:load_default_elevator_module
Cyclomatic Complexity 1 include/linux/context_tracking.h:context_tracking_init
Cyclomatic Complexity 1 include/linux/integrity.h:integrity_load_keys
Cyclomatic Complexity 1 include/linux/rodata_test.h:rodata_test
Cyclomatic Complexity 1 include/trace/events/initcall.h:trace_initcall_level
Cyclomatic Complexity 1 init/main.c:set_reset_devices
Cyclomatic Complexity 1 init/main.c:debug_kernel
Cyclomatic Complexity 1 init/main.c:quiet_kernel
Cyclomatic Complexity 2 init/main.c:init_setup
Cyclomatic Complexity 2 init/main.c:rdinit_setup
Cyclomatic Complexity 1 init/main.c:initcall_debug_enable
Cyclomatic Complexity 1 init/main.c:do_ctors
Cyclomatic Complexity 2 init/main.c:do_trace_initcall_start
Cyclomatic Complexity 2 init/main.c:do_trace_initcall_finish
Cyclomatic Complexity 1 init/main.c:set_debug_rodata
Cyclomatic Complexity 7 init/main.c:do_early_param
Cyclomatic Complexity 3 init/main.c:repair_env_string
Cyclomatic Complexity 4 init/main.c:set_init_arg
Cyclomatic Complexity 7 init/main.c:obsolete_checksetup
Cyclomatic Complexity 12 init/main.c:unknown_bootoption
..
vim +735 include/linux/ftrace.h
731
732 #ifdef CONFIG_FTRACE_MCOUNT_RECORD
733 extern void ftrace_init(void);
734 #else
> 735 static inline void ftrace_init(void) { ftrace_early_shutdown(); }
736 #endif
737
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28937 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v4] ftrace: support early boot function tracing
2018-12-06 8:35 [PATCH v4] ftrace: support early boot function tracing Abderrahmane Benbachir
2018-12-09 6:22 ` kbuild test robot
@ 2018-12-09 22:05 ` kbuild test robot
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2018-12-09 22:05 UTC (permalink / raw)
To: Abderrahmane Benbachir
Cc: kbuild-all, rostedt, linux-kernel, peterz, mingo,
mathieu.desnoyers, abderb
[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]
Hi Abderrahmane,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.20-rc5 next-20181207]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Abderrahmane-Benbachir/ftrace-support-early-boot-function-tracing/20181209-130427
config: i386-randconfig-s0-12100145 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from include/linux/perf_event.h:48:0,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:85,
from kernel/fork.c:52:
include/linux/ftrace.h: In function 'ftrace_init':
>> include/linux/ftrace.h:735:40: error: implicit declaration of function 'ftrace_early_shutdown' [-Werror=implicit-function-declaration]
static inline void ftrace_init(void) { ftrace_early_shutdown(); }
^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/ftrace_early_shutdown +735 include/linux/ftrace.h
731
732 #ifdef CONFIG_FTRACE_MCOUNT_RECORD
733 extern void ftrace_init(void);
734 #else
> 735 static inline void ftrace_init(void) { ftrace_early_shutdown(); }
736 #endif
737
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-09 22:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 8:35 [PATCH v4] ftrace: support early boot function tracing Abderrahmane Benbachir
2018-12-09 6:22 ` kbuild test robot
2018-12-09 22:05 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®