starpu_check_register.sh 549 B

12345678910111213141516
  1. #!/bin/bash
  2. # Note: expects Coccinelle's spatch command n the PATH
  3. # See: http://coccinelle.lip6.fr/
  4. stcolor=$(tput sgr0)
  5. redcolor=$(tput setaf 1)
  6. handles=$(spatch -very_quiet -sp_file tools/dev/starpu_check_register.cocci "$@")
  7. if test "x$handles" != "x" ; then
  8. for handle in $handles; do
  9. echo "$handle"
  10. register=$(echo $handle|awk -F ',' '{print $1}')
  11. location=$(echo $handle|awk -F ',' '{print $2}')
  12. echo "data handle ${redcolor}${register}${stcolor} registered at location $location does not seem to be properly unregistered"
  13. done
  14. fi