From owner-cvs-src@FreeBSD.ORG Thu Jan 13 07:53:02 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 326A016A4CE; Thu, 13 Jan 2005 07:53:02 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F20BC43D31; Thu, 13 Jan 2005 07:53:01 +0000 (GMT) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j0D7r1kn051425; Thu, 13 Jan 2005 07:53:01 GMT (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j0D7r1iZ051424; Thu, 13 Jan 2005 07:53:01 GMT (envelope-from phk) Message-Id: <200501130753.j0D7r1iZ051424@repoman.freebsd.org> From: Poul-Henning Kamp Date: Thu, 13 Jan 2005 07:53:01 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/fs/deadfs dead_vnops.c src/sys/fs/nullfs null_vnops.c src/sys/fs/umapfs umap_vnops.c src/sys/fs/unionfs union_vnops.c src/sys/kern vfs_init.c src/sys/sys vnode.h src/sys/tools vnode_if.awk X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2005 07:53:02 -0000 phk 2005-01-13 07:53:01 UTC FreeBSD src repository Modified files: sys/fs/deadfs dead_vnops.c sys/fs/nullfs null_vnops.c sys/fs/umapfs umap_vnops.c sys/fs/unionfs union_vnops.c sys/kern vfs_init.c sys/sys vnode.h sys/tools vnode_if.awk Log: Change the generated VOP_ macro implementations to improve type checking and KASSERT coverage. After this check there is only one "nasty" cast in this code but there is a KASSERT to protect against the wrong argument structure behind that cast. Un-inlining the meat of VOP_FOO() saves 35kB of text segment on a typical kernel with no change in performance. We also now run the checking and tracing on VOP's which have been layered by nullfs, umapfs, deadfs or unionfs. Add new (non-inline) VOP_FOO_AP() functions which take a "struct foo_args" argument and does everything the VOP_FOO() macros used to do with checks and debugging code. Add KASSERT to VOP_FOO_AP() check for argument type being correct. Slim down VOP_FOO() inline functions to just stuff arguments into the struct foo_args and call VOP_FOO_AP(). Put function pointer to VOP_FOO_AP() into vop_foo_desc structure and make VCALL() use it instead of the current offsetoff() hack. Retire vcall() which implemented the offsetoff() Make deadfs and unionfs use VOP_FOO_AP() calls instead of VCALL(), we know which specific call we want already. Remove unneeded arguments to VCALL() in nullfs and umapfs bypass functions. Remove unused vdesc_offset and VOFFSET(). Generally improve style/readability of the generated code. Revision Changes Path 1.45 +2 -2 src/sys/fs/deadfs/dead_vnops.c 1.72 +1 -1 src/sys/fs/nullfs/null_vnops.c 1.44 +1 -1 src/sys/fs/umapfs/umap_vnops.c 1.119 +21 -21 src/sys/fs/unionfs/union_vnops.c 1.79 +0 -26 src/sys/kern/vfs_init.c 1.265 +13 -12 src/sys/sys/vnode.h 1.46 +65 -48 src/sys/tools/vnode_if.awk