mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
29614b3788
added sysctl debug.witness.graphs and returns all the graphs involving Giant lock creating an appropriate script in DOT format which can be plotted immediately. Submitted by: Michele Dallachiesa <michele dot dallachiesa at poste dot it>
25 lines
427 B
Bash
25 lines
427 B
Bash
#!/bin/sh
|
|
################################################################################
|
|
#
|
|
# lockgraphs.sh by Michele Dallachiesa -- 2008-05-07 -- v0.1
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
################################################################################
|
|
|
|
sysctl debug.witness.graphs | awk '
|
|
BEGIN {
|
|
print "digraph lockgraphs {"
|
|
}
|
|
|
|
NR > 1 && $0 ~ /"Giant"/ {
|
|
gsub(","," -> ");
|
|
print $0 ";"
|
|
}
|
|
|
|
END {
|
|
print "}"
|
|
}'
|
|
|
|
#eof
|