blob: 152097f14bede736b1940b95678b6ac7c7199692 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#! /bin/sh
# Complain about unused statistics fields.
t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15
# List of files to search: skip stat.c, it lists all of the fields by
# definition.
l=`sed \
-e '/src\/support\/stat.c/d' \
-e 's,#.*,,' \
-e '/^$/d' \
-e 's,^,../,' filelist`
l="$l `echo ../src/include/*.i`"
(
# Get the list of statistics fields.
search=`sed \
-e 's/^ WT_STATS \([a-z_*]*\);$/\1/p' \
-e d ../src/include/stat.h |
sort`
echo "$search"
fgrep -who "$search" $l) | sort | uniq -u > $t
test -s $t && {
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
echo 'unused statistics fields'
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
cat $t
exit 1
}
exit 0
|