diff options
author | Bryan Cantrill <bryan@joyent.com> | 2011-04-05 18:40:38 -0700 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2011-04-05 18:40:38 -0700 |
commit | 819d86f83a080863cc483e82fe989af2d8a86893 (patch) | |
tree | 652e4519d8579704a162d1ad44f67ccc68680ceb /tools | |
parent | 1520843ee6c453a508532e951039a46434b4f8cb (diff) | |
download | illumos-kvm-819d86f83a080863cc483e82fe989af2d8a86893.tar.gz |
HVM-21 kvm.c needs to be xxxcheck-clean
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kvm-xxx.d | 3 | ||||
-rwxr-xr-x | tools/xxxcheck | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tools/kvm-xxx.d b/tools/kvm-xxx.d index 64393b0..4f155b2 100644 --- a/tools/kvm-xxx.d +++ b/tools/kvm-xxx.d @@ -4,10 +4,11 @@ kvm-xxx { - @[stringof(arg0), arg1] = count(); + @[stringof(arg0), probefunc, arg1] = count(); } tick-10sec { + printf("%-12s %-40s %-8s %8s\n", "FILE", "FUNCTION", "LINE", "COUNT"); printa("%20s %8d %@8d\n", @); } diff --git a/tools/xxxcheck b/tools/xxxcheck index 6ef9bf8..d6501f8 100755 --- a/tools/xxxcheck +++ b/tools/xxxcheck @@ -1,7 +1,17 @@ #!/bin/bash +# +# We prefer "new" AWK unless of course there isn't one, in which case we +# assume that awk is new AWK. +# +awk=`which nawk` + +if [[ -z $awk ]]; then + awk=`which awk` +fi + for file in $*; do - cat $file | nawk "\ + cat $file | $awk "\ /#ifdef/{ if (inif) { nest++; } } /#ifdef XXX/{ if (inif) { @@ -11,6 +21,7 @@ for file in $*; do inif = 1; nest = 0; } + /#ifdef XXX_KVM_STAT/{ inif = 0 } /#ifdef XXX_KVM_TRACE/{ inif = 0 } /#ifdef XXX_KVM_DOESNTCOMPILE/{ inif = 0 } /#ifdef XXX_KVM_DECLARATION/{ inif = 0 } |