ftrace: Add multi direct register/unregister interface
authorJiri Olsa <jolsa@redhat.com>
Fri, 8 Oct 2021 09:13:34 +0000 (11:13 +0200)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 21 Oct 2021 18:19:00 +0000 (14:19 -0400)
commitf64dd4627ec6edc39bf1430fe6dbc923d2300a88
tree6af01b2cbd462474a3d4080c7fbacf58f7409427
parent1904a8144598031af85406873c5fbec806ee3fd7
ftrace: Add multi direct register/unregister interface

Adding interface to register multiple direct functions
within single call. Adding following functions:

  register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
  unregister_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)

The register_ftrace_direct_multi registers direct function (addr)
with all functions in ops filter. The ops filter can be updated
before with ftrace_set_filter_ip calls.

All requested functions must not have direct function currently
registered, otherwise register_ftrace_direct_multi will fail.

The unregister_ftrace_direct_multi unregisters ops related direct
functions.

Link: https://lkml.kernel.org/r/20211008091336.33616-7-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/ftrace.h
kernel/trace/ftrace.c