* tapsets.cxx (register_standard_tapsets): Bind kprobe .call variants.
* man/stapprobes.3stap: Document this new possibility.
* tapset/linux/nd_syscalls.stp: Use .call to make sure that alias
suffixes can't tack a .return on nd_syscall.exit and .exit_group.
Following constructs are supported :
.SAMPLE
kprobe.function(FUNCTION)
+kprobe.function(FUNCTION).call
kprobe.function(FUNCTION).return
kprobe.module(NAME).function(FUNCTION)
+kprobe.module(NAME).function(FUNCTION).call
kprobe.module(NAME).function(FUNCTION).return
kprobe.statement.(ADDRESS).absolute
.ESAMPLE
# exit _______________________________________________________
# long sys_exit(int error_code)
-probe nd_syscall.exit = kprobe.function("do_exit")
+probe nd_syscall.exit = kprobe.function("do_exit").call
{
name = "exit"
// status = $code
}
# sys_exit() never returns, and is blacklisted for return probes,
# so no alias here. See bz6588.
+# NB: the explicit .call ensures that alias suffixes can't infer .return
# exit_group _________________________________________________
# void sys_exit_group(int error_code)
#
-probe nd_syscall.exit_group = kprobe.function("sys_exit_group") ?
+probe nd_syscall.exit_group = kprobe.function("sys_exit_group").call ?
{
name = "exit_group"
// status = $error_code
}
# sys_exit_group() never returns, and is blacklisted for return probes,
# so no alias here. See bz6588.
+# NB: the explicit .call ensures that alias suffixes can't infer .return
# faccessat __________________________________________________
# new function with 2.6.16
// Kprobe based probe
s.pattern_root->bind(TOK_KPROBE)->bind_str(TOK_FUNCTION)
->bind(new kprobe_builder());
+ s.pattern_root->bind(TOK_KPROBE)->bind_str(TOK_FUNCTION)->bind(TOK_CALL)
+ ->bind(new kprobe_builder());
s.pattern_root->bind(TOK_KPROBE)->bind_str(TOK_MODULE)
->bind_str(TOK_FUNCTION)->bind(new kprobe_builder());
+ s.pattern_root->bind(TOK_KPROBE)->bind_str(TOK_MODULE)
+ ->bind_str(TOK_FUNCTION)->bind(TOK_CALL)->bind(new kprobe_builder());
s.pattern_root->bind(TOK_KPROBE)->bind_str(TOK_FUNCTION)->bind(TOK_RETURN)
->bind(new kprobe_builder());
s.pattern_root->bind(TOK_KPROBE)->bind_str(TOK_FUNCTION)->bind(TOK_RETURN)