Skip to content

Commit a762e92

Browse files
mhiramatrostedt
authored andcommitted
ftrace: Add CONFIG_HAVE_FTRACE_GRAPH_FUNC
Add CONFIG_HAVE_FTRACE_GRAPH_FUNC kconfig in addition to ftrace_graph_func macro check. This is for the other feature (e.g. FPROBE) which requires to access ftrace_regs from fgraph_ops::entryfunc() can avoid compiling if the fgraph can not pass the valid ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com> Cc: Florent Revest <revest@chromium.org> Cc: Martin KaFai Lau <martin.lau@linux.dev> Cc: bpf <bpf@vger.kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alan Maguire <alan.maguire@oracle.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Naveen N Rao <naveen@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: x86@kernel.org Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/173519001472.391279.1174901685282588467.stgit@devnote2 Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 8e2759d commit a762e92

File tree

6 files changed

+10
-0
lines changed

6 files changed

+10
-0
lines changed

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ config ARM64
216216
select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
217217
select HAVE_EFFICIENT_UNALIGNED_ACCESS
218218
select HAVE_GUP_FAST
219+
select HAVE_FTRACE_GRAPH_FUNC
219220
select HAVE_FTRACE_MCOUNT_RECORD
220221
select HAVE_FUNCTION_TRACER
221222
select HAVE_FUNCTION_ERROR_INJECTION

arch/loongarch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ config LOONGARCH
135135
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !ARCH_STRICT_ALIGN
136136
select HAVE_EXIT_THREAD
137137
select HAVE_GUP_FAST
138+
select HAVE_FTRACE_GRAPH_FUNC
138139
select HAVE_FTRACE_MCOUNT_RECORD
139140
select HAVE_FUNCTION_ARG_ACCESS_API
140141
select HAVE_FUNCTION_ERROR_INJECTION

arch/powerpc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ config PPC
240240
select HAVE_EBPF_JIT
241241
select HAVE_EFFICIENT_UNALIGNED_ACCESS
242242
select HAVE_GUP_FAST
243+
select HAVE_FTRACE_GRAPH_FUNC
243244
select HAVE_FTRACE_MCOUNT_RECORD
244245
select HAVE_FUNCTION_ARG_ACCESS_API
245246
select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ config RISCV
146146
select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && (CLANG_SUPPORTS_DYNAMIC_FTRACE || GCC_SUPPORTS_DYNAMIC_FTRACE)
147147
select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
148148
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if HAVE_DYNAMIC_FTRACE
149+
select HAVE_FTRACE_GRAPH_FUNC
149150
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
150151
select HAVE_FUNCTION_GRAPH_TRACER
151152
select HAVE_FUNCTION_GRAPH_FREGS

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ config X86
235235
select HAVE_EXIT_THREAD
236236
select HAVE_GUP_FAST
237237
select HAVE_FENTRY if X86_64 || DYNAMIC_FTRACE
238+
select HAVE_FTRACE_GRAPH_FUNC if HAVE_FUNCTION_GRAPH_TRACER
238239
select HAVE_FTRACE_MCOUNT_RECORD
239240
select HAVE_FUNCTION_GRAPH_FREGS if HAVE_FUNCTION_GRAPH_TRACER
240241
select HAVE_FUNCTION_GRAPH_TRACER if X86_32 || (X86_64 && DYNAMIC_FTRACE)

kernel/trace/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ config HAVE_FUNCTION_GRAPH_TRACER
3434
config HAVE_FUNCTION_GRAPH_FREGS
3535
bool
3636

37+
config HAVE_FTRACE_GRAPH_FUNC
38+
bool
39+
help
40+
True if ftrace_graph_func() is defined.
41+
3742
config HAVE_DYNAMIC_FTRACE
3843
bool
3944
help

0 commit comments

Comments
 (0)