]> Git Repo - linux.git/commit
ftrace: Rework event_create_dir()
authorPeter Zijlstra <[email protected]>
Thu, 24 Oct 2019 20:26:59 +0000 (22:26 +0200)
committerIngo Molnar <[email protected]>
Wed, 27 Nov 2019 06:44:25 +0000 (07:44 +0100)
commit04ae87a52074e2d448fc66143f1bd2c7d694d2b9
tree38b114b4f0469626996571e3a42345d54ee1e049
parent958de668197651bbf2b4b9528f204ab5a0f1af65
ftrace: Rework event_create_dir()

Rework event_create_dir() to use an array of static data instead of
function pointers where possible.

The problem is that it would call the function pointer on module load
before parse_args(), possibly even before jump_labels were initialized.
Luckily the generated functions don't use jump_labels but it still seems
fragile. It also gets in the way of changing when we make the module map
executable.

The generated function are basically calling trace_define_field() with a
bunch of static arguments. So instead of a function, capture these
arguments in a static array, avoiding the function call.

Now there are a number of cases where the fields are dynamic (syscall
arguments, kprobes and uprobes), in which case a static array does not
work, for these we preserve the function call. Luckily all these cases
are not related to modules and so we can retain the function call for
them.

Also fix up all broken tracepoint definitions that now generate a
compile error.

Tested-by: Alexei Starovoitov <[email protected]>
Tested-by: Steven Rostedt (VMware) <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Steven Rostedt (VMware) <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
21 files changed:
drivers/infiniband/hw/hfi1/trace_tid.h
drivers/infiniband/hw/hfi1/trace_tx.h
drivers/lightnvm/pblk-trace.h
drivers/net/fjes/fjes_trace.h
drivers/net/wireless/ath/ath10k/trace.h
fs/xfs/scrub/trace.h
fs/xfs/xfs_trace.h
include/linux/trace_events.h
include/trace/events/filemap.h
include/trace/events/rpcrdma.h
include/trace/trace_events.h
kernel/trace/trace.h
kernel/trace/trace_entries.h
kernel/trace/trace_events.c
kernel/trace/trace_events_hist.c
kernel/trace/trace_export.c
kernel/trace/trace_kprobe.c
kernel/trace/trace_syscalls.c
kernel/trace/trace_uprobe.c
net/mac80211/trace.h
net/wireless/trace.h
This page took 0.057096 seconds and 4 git commands to generate.