]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb28688b06564b995703c2b05c47dab67f0ffa32f
tree6af01b2cbd462474a3d4080c7fbacf58f7409427
parent31fb0d7d6e69e5b72d0c2653edaeca660a446f11
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