tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Kernel party trick
Have YOU ever wanted to quickly analyze locking on a long function?
well, wait no longer!
I have this function as a script:
$ cat ~/bin/fun
#!/bin/sh
awk "/^$@/,/^}/" *
Example usage:
$ fun lfs_truncate |grep -e mutex -e PUTPAGES
mutex_enter(ovp->v_interlock);
VOP_PUTPAGES(ovp,
mutex_enter(&lfs_lock);
mutex_exit(&lfs_lock);
mutex_enter(ovp->v_interlock);
error = VOP_PUTPAGES(ovp, round_page(length),
mutex_enter(&lfs_lock);
mutex_exit(&lfs_lock);
Pretty quick sanity check for a 412 line function!
Home |
Main Index |
Thread Index |
Old Index