lkml.org 
[lkml]   [2021]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [RFC] perf/core: allow ftrace for functions in kernel/event/core.c
Date


> On Jun 5, 2020, at 3:02 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Fri, 5 Jun 2020 21:58:48 +0000
> Song Liu <songliubraving@fb.com> wrote:
>
>>
>> How does this work in your tests?
>
> I started it, but got distracted by other work. It did not crash with
> the little testing I did do. I wanted to also look at my patch that
> adds tracing to the ftrace directory too.
>
> I'll try to remember to address this some more next week. Feel free to
> ping me again then.

It looks like we dropped the ball more than a year ago.

Adding Andrii and KP, who both hit this limitation in their recent work.
I also hit this again recently. I was trying to use kernel live patch to
fix a perf issue, but realized the whole kernel/events directory is not
ftrace-able. :(


Hi Steven,

I am not sure whether you have got chance to test it more thoroughly.
Optimistically assuming it didn't crash easily :-) , what would you
suggest for our next steps?

Thanks,
Song



Attaching the original RFC/PATCH below.

From: Song Liu <songliubraving@fb.com>
Subject: [RFC] perf/core: allow ftrace for functions in kernel/event/core.c

It is useful to trace functions in kernel/event/core.c. Allow ftrace for
them by removing $(CC_FLAGS_FTRACE) from Makefile.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
---
kernel/events/Makefile | 5 -----
1 file changed, 5 deletions(-)

diff --git a/kernel/events/Makefile b/kernel/events/Makefile
index 3c022e33c109..8591c180b52b 100644
--- a/kernel/events/Makefile
+++ b/kernel/events/Makefile
@@ -1,10 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-ifdef CONFIG_FUNCTION_TRACER
-CFLAGS_REMOVE_core.o =3D $(CC_FLAGS_FTRACE)
-endif
-
obj-y :=3D core.o ring_buffer.o callchain.o
=20
obj-$(CONFIG_HAVE_HW_BREAKPOINT) +=3D hw_breakpoint.o
obj-$(CONFIG_UPROBES) +=3D uprobes.o
-
--=20
2.24.1
\
 
 \ /
  Last update: 2021-09-24 19:16    [W:0.071 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site