akaros/scripts/spatch/poor-ftrace.cocci
<<
>>
Prefs
   1// prints entry/exit when entering/leaving a function
   2
   3// for example, spatch with:
   4// $ for i in kern/src/ns/ kern/src/net kern/drivers/; do \
   5//       spatch --sp-file scripts/spatch/poor-ftrace.cocci  --in-place $i; done 
   6// if you have functions you want to ignore, add them to the blacklist in
   7// kern/src/kdebug.c
   8@@
   9type t;
  10function f;
  11@@
  12t f(...) {
  13+print_func_entry();
  14<...
  15+print_func_exit();
  16return ...;
  17...>
  18}
  19