summaryrefslogtreecommitdiff
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2022-03-15 23:00:38 +0900
committerAlexei Starovoitov <ast@kernel.org>2022-03-17 20:16:15 -0700
commitcad9931f64dc7f5dbdec12cae9f30063360f9855 (patch)
tree9cafaa881cef703b8819373e1a3ca2a237757185 /mm/compaction.c
parent4f554e955614f19425cee86de4669351741a6280 (diff)
fprobe: Add ftrace based probe APIs
The fprobe is a wrapper API for ftrace function tracer. Unlike kprobes, this probes only supports the function entry, but this can probe multiple functions by one fprobe. The usage is similar, user will set their callback to fprobe::entry_handler and call register_fprobe*() with probed functions. There are 3 registration interfaces, - register_fprobe() takes filtering patterns of the functin names. - register_fprobe_ips() takes an array of ftrace-location addresses. - register_fprobe_syms() takes an array of function names. The registered fprobes can be unregistered with unregister_fprobe(). e.g. struct fprobe fp = { .entry_handler = user_handler }; const char *targets[] = { "func1", "func2", "func3"}; ... ret = register_fprobe_syms(&fp, targets, ARRAY_SIZE(targets)); ... unregister_fprobe(&fp); Signed-off-by: Masami Hiramatsu <mhiramat@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/164735283857.1084943.1154436951479395551.stgit@devnote2
Diffstat (limited to 'mm/compaction.c')
0 files changed, 0 insertions, 0 deletions