ftrace: Add ftrace_set_filter_ips function
authorJiri Olsa <jolsa@redhat.com>
Tue, 15 Mar 2022 14:00:26 +0000 (23:00 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 18 Mar 2022 03:15:17 +0000 (20:15 -0700)
commit4f554e955614f19425cee86de4669351741a6280
treeeb34e6a359043c9840ebd4ad7ee772e0b5510f9b
parente0999c8e590935b13dd598a6480685eae9c1b3c5
ftrace: Add ftrace_set_filter_ips function

Adding ftrace_set_filter_ips function to be able to set filter on
multiple ip addresses at once.

With the kprobe multi attach interface we have cases where we need to
initialize ftrace_ops object with thousands of functions, so having
single function diving into ftrace_hash_move_and_update_ops with
ftrace_lock is faster.

The functions ips are passed as unsigned long array with count.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Tested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/164735282673.1084943.18310504594134769804.stgit@devnote2
include/linux/ftrace.h
kernel/trace/ftrace.c