]> sourceware.org Git - systemtap.git/commitdiff
Add kprobe.function.call, and squash nd_syscall.exit.return
authorJosh Stone <jistone@redhat.com>
Tue, 5 Feb 2013 21:17:16 +0000 (13:17 -0800)
committerJosh Stone <jistone@redhat.com>
Tue, 5 Feb 2013 21:21:44 +0000 (13:21 -0800)
* 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.

man/stapprobes.3stap
tapset/linux/nd_syscalls.stp
tapsets.cxx

index fd3156a1691ec70241add4b8925dc523295ff4e2..19d4c61655bc4d539fb8c8c54adb76cff4aa6235 100644 (file)
@@ -596,8 +596,10 @@ of the function.
 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
index 28024ef3e90e64339860fb213ae3e2ba17a3981d..6cd0dc56d04a19079cd6bc2acd4ec33ed42ea636 100644 (file)
@@ -1003,7 +1003,7 @@ probe nd_syscall.compat_execve.return = kprobe.function("compat_do_execve").retu
 
 # 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
@@ -1014,11 +1014,12 @@ probe nd_syscall.exit = kprobe.function("do_exit")
 }
 # 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
@@ -1029,6 +1030,7 @@ probe nd_syscall.exit_group = kprobe.function("sys_exit_group") ?
 }
 # 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
index 18b29846ce661988482fd59f92b15df2f99e6298..d17ae2ab5f8c49a017694fa36296219cbda75e46 100644 (file)
@@ -10151,8 +10151,12 @@ register_standard_tapsets(systemtap_session & s)
   // 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)
This page took 0.056751 seconds and 5 git commands to generate.