poor-ftrace.cocci 422 B

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