Skip to content

Commit

Permalink
samples: add HAVE_SAMPLE_FTRACE_DIRECT config option
Browse files Browse the repository at this point in the history
Add HAVE_SAMPLE_FTRACE_DIRECT config option which can be selected by
architectures which have support for ftrace direct call samples.

Acked-by: Ilya Leoshkevich <[email protected]>
Reviewed-by: Sven Schnelle <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Acked-by: Steven Rostedt (VMware) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vasily Gorbik <[email protected]>
  • Loading branch information
hcahca authored and Vasily Gorbik committed Oct 19, 2021
1 parent 3d487ac commit c316eb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ config X86
select HAVE_DYNAMIC_FTRACE_WITH_REGS
select HAVE_DYNAMIC_FTRACE_WITH_ARGS if X86_64
select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
select HAVE_SAMPLE_FTRACE_DIRECT if X86_64
select HAVE_EBPF_JIT
select HAVE_EFFICIENT_UNALIGNED_ACCESS
select HAVE_EISA
Expand Down
5 changes: 4 additions & 1 deletion samples/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ config SAMPLE_TRACE_PRINTK
config SAMPLE_FTRACE_DIRECT
tristate "Build register_ftrace_direct() example"
depends on DYNAMIC_FTRACE_WITH_DIRECT_CALLS && m
depends on X86_64 # has x86_64 inlined asm
depends on HAVE_SAMPLE_FTRACE_DIRECT
help
This builds an ftrace direct function example
that hooks to wake_up_process and prints the parameters.
Expand Down Expand Up @@ -224,3 +224,6 @@ config SAMPLE_WATCH_QUEUE
sb_notify() syscalls and the KEYCTL_WATCH_KEY keyctl() function.

endif # SAMPLES

config HAVE_SAMPLE_FTRACE_DIRECT
bool

0 comments on commit c316eb4

Please sign in to comment.