add a command to calculate the ratios of cnt_hold and cnt_lock to locks
from mutex profiling... This takes cnt_* and divides it by count, so lower is better... Sample command: sh mtxpercent.sh | sort -rn +7 -8 SEE ALSO MUTEX_PROFILING(9)
This commit is contained in:
parent
a31f99f887
commit
03c439e6e0
2
tools/tools/mtxstat/mtxratio.sh
Normal file
2
tools/tools/mtxstat/mtxratio.sh
Normal file
@ -0,0 +1,2 @@
|
||||
# $FreeBSD$
|
||||
sysctl debug.mutex.prof.stats | awk '$1 ~ /[0-9]+/ { if ($3 != 0) { hld_prc = $5 / $3 * 100; lck_prc = $6 / $3 * 100 } else { hld_prc = 0; lck_prc = 0 } print $1 " " $2 " " $3 " " $4 " " $5 " " hld_prc " " $6 " " lck_prc " " substr($0, index($0, $7)); next } { print }'
|
Loading…
Reference in New Issue
Block a user