summaryrefslogtreecommitdiff
path: root/sys/tools
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2002-07-06 03:46:36 +0000
committerJeff Roberson <jeff@FreeBSD.org>2002-07-06 03:46:36 +0000
commitd1376090b20be975f28dd5025e48ec7d5001da54 (patch)
tree6d58ba75508707a1973476379daddafa73f8dbca /sys/tools
parentce03184300ba55a990f1274c06000b5ed1b3a726 (diff)
downloadsrc-test2-d1376090b20be975f28dd5025e48ec7d5001da54.tar.gz
src-test2-d1376090b20be975f28dd5025e48ec7d5001da54.zip
Notes
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/vnode_if.awk29
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk
index 46f53fbddc18..16475e4eedf8 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -77,6 +77,20 @@ function add_debug_code(name, arg)
}
}
+function add_debug_pre(name)
+{
+ if (debug_all_vfs_locks && lockdata[name, "pre"]) {
+ printh("\t"lockdata[name, "pre"]"(&a);");
+ }
+}
+
+function add_debug_post(name)
+{
+ if (debug_all_vfs_locks && lockdata[name, "post"]) {
+ printh("\t"lockdata[name, "post"]"(&a, rc);");
+ }
+}
+
function find_arg_with_type (type)
{
for (jj = 0; jj < numargs; jj++) {
@@ -147,7 +161,7 @@ if (cfile) {
while ((getline < srcfile) > 0) {
if (NF == 0)
continue;
- if ($1 ~ /^#/) {
+ if ($1 ~ /^#%/) {
if (NF != 6 || $1 != "#%" || \
$2 !~ /^[a-z]+$/ || $3 !~ /^[a-z]+$/ || \
$4 !~ /^.$/ || $5 !~ /^.$/ || $6 !~ /^.$/)
@@ -158,6 +172,17 @@ while ((getline < srcfile) > 0) {
continue;
}
+ if ($1 ~ /^#!/) {
+ if (NF != 4 || $1 != "#!")
+ continue;
+ if ($3 != "pre" && $3 != "post")
+ continue;
+ lockdata["vop_" $2, $3] = $4;
+ continue;
+ }
+ if ($1 ~ /^#/)
+ continue;
+
# Get the function name.
name = $1;
uname = toupper(name);
@@ -228,7 +253,9 @@ while ((getline < srcfile) > 0) {
printh("\ta.a_" args[i] " = " args[i] ";");
for (i = 0; i < numargs; ++i)
add_debug_code(name, args[i]);
+ add_debug_pre(name);
printh("\trc = VCALL(" args[0] ", VOFFSET(" name "), &a);");
+ add_debug_post(name);
printh("\treturn (rc);\n}");
}