[Midnightbsd-cvs] src [9898] U trunk/sys/tools: update scripts

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu May 24 18:33:15 EDT 2018


Revision: 9898
          http://svnweb.midnightbsd.org/src/?rev=9898
Author:   laffer1
Date:     2018-05-24 18:33:14 -0400 (Thu, 24 May 2018)
Log Message:
-----------
update scripts

Modified Paths:
--------------
    trunk/sys/tools/acpi_quirks2h.awk
    trunk/sys/tools/bus_macro.sh
    trunk/sys/tools/embed_mfs.sh
    trunk/sys/tools/usbdevs2h.awk
    trunk/sys/tools/vnode_if.awk

Property Changed:
----------------
    trunk/sys/tools/acpi_quirks2h.awk
    trunk/sys/tools/bus_macro.sh
    trunk/sys/tools/embed_mfs.sh
    trunk/sys/tools/usbdevs2h.awk
    trunk/sys/tools/vnode_if.awk

Modified: trunk/sys/tools/acpi_quirks2h.awk
===================================================================
--- trunk/sys/tools/acpi_quirks2h.awk	2018-05-24 22:29:08 UTC (rev 9897)
+++ trunk/sys/tools/acpi_quirks2h.awk	2018-05-24 22:33:14 UTC (rev 9898)
@@ -1,6 +1,7 @@
 #!/usr/bin/awk -f
 #
-# $FreeBSD: src/sys/tools/acpi_quirks2h.awk,v 1.4 2007/03/22 18:16:43 jkim Exp $
+# $FreeBSD: stable/10/sys/tools/acpi_quirks2h.awk 167814 2007-03-22 18:16:43Z jkim $
+# $MidnightBSD$
 
 #-
 # Copyright (c) 2004 Mark Santcroos <marks at ripe.net>


Property changes on: trunk/sys/tools/acpi_quirks2h.awk
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sys/tools/bus_macro.sh
===================================================================
--- trunk/sys/tools/bus_macro.sh	2018-05-24 22:29:08 UTC (rev 9897)
+++ trunk/sys/tools/bus_macro.sh	2018-05-24 22:33:14 UTC (rev 9898)
@@ -24,7 +24,8 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD: src/sys/tools/bus_macro.sh,v 1.1 2005/09/24 20:11:07 phk Exp $
+# $FreeBSD: stable/10/sys/tools/bus_macro.sh 150524 2005-09-24 20:11:07Z phk $
+# $MidnightBSD$
 #
 # Generate the convenience macros at the bottom of sys/bus.h
 #


Property changes on: trunk/sys/tools/bus_macro.sh
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sys/tools/embed_mfs.sh
===================================================================
--- trunk/sys/tools/embed_mfs.sh	2018-05-24 22:29:08 UTC (rev 9897)
+++ trunk/sys/tools/embed_mfs.sh	2018-05-24 22:33:14 UTC (rev 9898)
@@ -23,7 +23,8 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# $FreeBSD$ 
+# $FreeBSD: stable/10/sys/tools/embed_mfs.sh 175984 2008-02-05 10:46:30Z raj $ 
+# $MidnightBSD$
 #
 # Embed the MFS image into the kernel body (expects space reserved via 
 # MD_ROOT_SIZE)


Property changes on: trunk/sys/tools/embed_mfs.sh
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sys/tools/usbdevs2h.awk
===================================================================
--- trunk/sys/tools/usbdevs2h.awk	2018-05-24 22:29:08 UTC (rev 9897)
+++ trunk/sys/tools/usbdevs2h.awk	2018-05-24 22:33:14 UTC (rev 9898)
@@ -1,7 +1,8 @@
 #! /usr/bin/awk -f
 #-
 #	$NetBSD: usb/devlist2h.awk,v 1.9 2001/01/18 20:28:22 jdolecek Exp $
-#  $FreeBSD$
+#  $FreeBSD: stable/10/sys/tools/usbdevs2h.awk 139825 2005-01-07 02:29:27Z imp $
+# $MidnightBSD$
 #
 # Copyright (c) 1995, 1996 Christopher G. Demetriou
 # All rights reserved.
@@ -44,6 +45,8 @@
 		printf("/*\t\$NetBSD\$\t*/\n\n") > file
 	else if (os == "FreeBSD")
 		printf("/* \$FreeBSD\$ */\n\n") > file
+	else if (os == "MidnightBSD")
+		printf("/* \$MidnightBSD\$ */\n\n") > file
 	else if (os == "OpenBSD")
 		printf("/*\t\$OpenBSD\$\t*/\n\n") > file
 	else


Property changes on: trunk/sys/tools/usbdevs2h.awk
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/sys/tools/vnode_if.awk
===================================================================
--- trunk/sys/tools/vnode_if.awk	2018-05-24 22:29:08 UTC (rev 9897)
+++ trunk/sys/tools/vnode_if.awk	2018-05-24 22:33:14 UTC (rev 9898)
@@ -30,8 +30,8 @@
 
 #
 #	@(#)vnode_if.sh	8.1 (Berkeley) 6/10/93
-# $FreeBSD: src/sys/tools/vnode_if.awk,v 1.55 2006/05/30 21:13:28 dds Exp $
-# $MidnightBSD: src/sys/tools/vnode_if.awk,v 1.3 2012/03/28 23:22:17 laffer1 Exp $
+# $FreeBSD: stable/10/sys/tools/vnode_if.awk 289798 2015-10-23 07:40:43Z avg $
+# $MidnightBSD$
 #
 # Script to produce VFS front-end sugar.
 #
@@ -143,7 +143,7 @@
     " * This file is produced automatically.\n" \
     " * Do not modify anything in here by hand.\n" \
     " *\n" \
-    " * Created from $MidnightBSD: src/sys/tools/vnode_if.awk,v 1.3 2012/03/28 23:22:17 laffer1 Exp $\n" \
+    " * Created from $MidnightBSD$\n" \
     " */\n" \
     "\n";
 
@@ -224,8 +224,6 @@
 	name = $1;
 	uname = toupper(name);
 
-	# Start constructing a ktrpoint string
-	ctrstr = "\"" uname;
 	# Get the function arguments.
 	for (numargs = 0; ; ++numargs) {
 		if ((getline < srcfile) <= 0) {
@@ -269,27 +267,15 @@
 		# remove trailing space (if any)
 		sub(/ $/, "");
 		types[numargs] = $0;
-
-		# We can do a maximum of 6 arguments to CTR*
-		if (numargs <= 6) {
-			if (numargs == 0)
-				ctrstr = ctrstr "(" args[numargs];
-			else
-				ctrstr = ctrstr ", " args[numargs];
-			if (types[numargs] ~ /\*/)
-				ctrstr = ctrstr " 0x%lX";
-			else
-				ctrstr = ctrstr " %ld";
-		}
 	}
-	if (numargs > 6)
-		ctrargs = 6;
+	if (numargs > 4)
+		ctrargs = 4;
 	else
 		ctrargs = numargs;
-	ctrstr = "\tCTR" ctrargs "(KTR_VOP,\n\t    " ctrstr ")\",\n\t    ";
-	ctrstr = ctrstr "a->a_" args[0];
+	ctrstr = ctrargs "(KTR_VOP, \"VOP\", \"" uname "\", (uintptr_t)a,\n\t    "; 
+	ctrstr = ctrstr "\"" args[0] ":0x%jX\", (uintptr_t)a->a_" args[0];
 	for (i = 1; i < ctrargs; ++i)
-		ctrstr = ctrstr ", a->a_" args[i];
+		ctrstr = ctrstr ", \"" args[i] ":0x%jX\", a->a_" args[i];
 	ctrstr = ctrstr ");";
 
 	if (pfile) {
@@ -357,8 +343,8 @@
 		printc("};");
 
 		printc("\n");
-		printc("SDT_PROBE_DEFINE2(vfs, vop, " name ", entry, entry, \"struct vnode *\", \"struct " name "_args *\");\n");
-		printc("SDT_PROBE_DEFINE3(vfs, vop, " name ", return, return, \"struct vnode *\", \"struct " name "_args *\", \"int\");\n");
+		printc("SDT_PROBE_DEFINE2(vfs, vop, " name ", entry, \"struct vnode *\", \"struct " name "_args *\");\n");
+		printc("SDT_PROBE_DEFINE3(vfs, vop, " name ", return, \"struct vnode *\", \"struct " name "_args *\", \"int\");\n");
 
 		# Print out function.
 		printc("\nint\n" uname "_AP(struct " name "_args *a)");
@@ -376,9 +362,10 @@
 		printc("\t    vop->"name" == NULL && vop->vop_bypass == NULL)")
 		printc("\t\tvop = vop->vop_default;")
 		printc("\tVNASSERT(vop != NULL, a->a_" args[0]", (\"No "name"(%p, %p)\", a->a_" args[0]", a));")
-		printc("\tSDT_PROBE(vfs, vop, " name ", entry, a->a_" args[0] ", a, 0, 0, 0);\n");
+		printc("\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);\n");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "Entry", "\t");
+		printc("\tKTR_START" ctrstr);
 		add_pre(name);
 		printc("\tVFS_PROLOGUE(a->a_" args[0]"->v_mount);")
 		printc("\tif (vop->"name" != NULL)")
@@ -386,8 +373,7 @@
 		printc("\telse")
 		printc("\t\trc = vop->vop_bypass(&a->a_gen);")
 		printc("\tVFS_EPILOGUE(a->a_" args[0]"->v_mount);")
-		printc(ctrstr);
-		printc("\tSDT_PROBE(vfs, vop, " name ", return, a->a_" args[0] ", a, rc, 0, 0);\n");
+		printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);\n");
 		printc("\tif (rc == 0) {");
 		for (i = 0; i < numargs; ++i)
 			add_debug_code(name, args[i], "OK", "\t\t");
@@ -396,6 +382,7 @@
 			add_debug_code(name, args[i], "Error", "\t\t");
 		printc("\t}");
 		add_post(name);
+		printc("\tKTR_STOP" ctrstr);
 		printc("\treturn (rc);");
 		printc("}\n");
 


Property changes on: trunk/sys/tools/vnode_if.awk
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list