Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2004 10:19:29 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 53057 for review
Message-ID:  <200405191719.i4JHJTWY013256@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=53057

Change 53057 by peter@peter_daintree on 2004/05/19 10:18:42

	IFC @53055

Affected files ...

.. //depot/projects/hammer/contrib/cvs/src/server.c#6 integrate
.. //depot/projects/hammer/etc/defaults/periodic.conf#9 integrate
.. //depot/projects/hammer/etc/periodic/weekly/400.status-pkg#3 integrate
.. //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#10 integrate
.. //depot/projects/hammer/lib/libarchive/tar.5#4 integrate
.. //depot/projects/hammer/lib/libc/gmon/Makefile.inc#6 integrate
.. //depot/projects/hammer/lib/libc/sys/mlock.2#4 integrate
.. //depot/projects/hammer/share/man/man4/ng_hole.4#2 integrate
.. //depot/projects/hammer/sys/alpha/include/profile.h#2 integrate
.. //depot/projects/hammer/sys/amd64/amd64/machdep.c#86 integrate
.. //depot/projects/hammer/sys/amd64/include/profile.h#16 integrate
.. //depot/projects/hammer/sys/arm/include/profile.h#2 integrate
.. //depot/projects/hammer/sys/i386/include/profile.h#8 integrate
.. //depot/projects/hammer/sys/ia64/include/profile.h#2 integrate
.. //depot/projects/hammer/sys/kern/link_elf.c#18 integrate
.. //depot/projects/hammer/sys/kern/uipc_socket2.c#15 integrate
.. //depot/projects/hammer/sys/netgraph/ng_hole.c#2 integrate
.. //depot/projects/hammer/sys/netgraph/ng_hole.h#3 integrate
.. //depot/projects/hammer/sys/pci/agp_sis.c#9 integrate
.. //depot/projects/hammer/sys/pci/if_sk.c#25 integrate
.. //depot/projects/hammer/sys/powerpc/include/profile.h#2 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/trap.c#7 integrate
.. //depot/projects/hammer/sys/sparc64/include/profile.h#2 integrate
.. //depot/projects/hammer/sys/sys/gmon.h#3 integrate
.. //depot/projects/hammer/usr.bin/bluetooth/bthost/bthost.1#2 integrate
.. //depot/projects/hammer/usr.bin/bluetooth/btsockstat/btsockstat.1#6 integrate
.. //depot/projects/hammer/usr.bin/colldef/colldef.1#7 integrate
.. //depot/projects/hammer/usr.bin/env/env.1#4 integrate
.. //depot/projects/hammer/usr.bin/fetch/fetch.1#8 integrate
.. //depot/projects/hammer/usr.bin/fetch/fetch.c#9 integrate
.. //depot/projects/hammer/usr.bin/find/find.1#9 integrate
.. //depot/projects/hammer/usr.bin/indent/indent.1#3 integrate
.. //depot/projects/hammer/usr.bin/locale/locale.1#4 integrate
.. //depot/projects/hammer/usr.bin/mail/mail.1#5 integrate
.. //depot/projects/hammer/usr.bin/make/make.1#10 integrate
.. //depot/projects/hammer/usr.bin/netstat/netstat.1#8 integrate
.. //depot/projects/hammer/usr.bin/pkill/pkill.1#2 integrate
.. //depot/projects/hammer/usr.bin/script/script.1#4 integrate
.. //depot/projects/hammer/usr.bin/su/su.1#6 integrate
.. //depot/projects/hammer/usr.bin/tar/bsdtar.c#6 integrate
.. //depot/projects/hammer/usr.bin/tar/write.c#7 integrate
.. //depot/projects/hammer/usr.bin/tftp/tftp.1#5 integrate
.. //depot/projects/hammer/usr.bin/vmstat/vmstat.8#6 integrate

Differences ...

==== //depot/projects/hammer/contrib/cvs/src/server.c#6 (text+ko) ====

@@ -9,7 +9,7 @@
    GNU General Public License for more details.  */
 
 /*
- * $FreeBSD: src/contrib/cvs/src/server.c,v 1.21 2004/04/15 01:17:27 peter Exp $
+ * $FreeBSD: src/contrib/cvs/src/server.c,v 1.22 2004/05/19 06:17:52 des Exp $
  */
 
 #include <assert.h>
@@ -1645,7 +1645,7 @@
 	    && strncmp (arg, name, cp - name) == 0)
 	{
 	    timefield = strchr (cp + 1, '/') + 1;
-	    if (*timefield != '=')
+	    if (*timefield == '/')
 	    {
 		cp = timefield + strlen (timefield);
 		cp[1] = '\0';
@@ -1689,7 +1689,7 @@
 	    && strncmp (arg, name, cp - name) == 0)
 	{
 	    timefield = strchr (cp + 1, '/') + 1;
-	    if (!(timefield[0] == 'M' && timefield[1] == '/'))
+	    if (*timefield == '/')
 	    {
 		cp = timefield + strlen (timefield);
 		cp[1] = '\0';

==== //depot/projects/hammer/etc/defaults/periodic.conf#9 (text+ko) ====

@@ -10,7 +10,7 @@
 # values set in this file.  This eases the upgrade path when defaults
 # are changed and new features are added.
 #
-# $FreeBSD: src/etc/defaults/periodic.conf,v 1.28 2004/04/20 13:44:57 darrenr Exp $
+# $FreeBSD: src/etc/defaults/periodic.conf,v 1.29 2004/05/19 09:18:07 joe Exp $
 #
 
 # What files override these defaults ?
@@ -204,6 +204,7 @@
 # 400.status-pkg
 weekly_status_pkg_enable="NO"				# Find out-of-date pkgs
 pkg_version=pkg_version					# Use this program
+pkg_version_index=/usr/ports/INDEX-5			# Use this index file
 
 # 999.local
 weekly_local="/etc/weekly.local"			# Local scripts

==== //depot/projects/hammer/etc/periodic/weekly/400.status-pkg#3 (text+ko) ====

@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $FreeBSD: src/etc/periodic/weekly/400.status-pkg,v 1.8 2002/09/25 03:01:42 brian Exp $
+# $FreeBSD: src/etc/periodic/weekly/400.status-pkg,v 1.9 2004/05/19 09:18:08 joe Exp $
 #
 
 # If there is a global system configuration file, suck it in.
@@ -16,7 +16,7 @@
 	echo ""
 	echo "Check for out of date packages:"
 
-	rc=$(${pkg_version:-pkg_version} -v |
+	rc=$(${pkg_version:-pkg_version} -v ${pkg_version_index} |
 	    sed -n -e 's/^\([^ ]*\)  *<  */  \1 /p' \
 		-e '/^[^ ]*-\([^ ]*\)  *\* *multiple versions.*[ ,]\1[,)].*/d' \
 		-e 's/^\([^ ]*\)  *\* *multiple versions.*\((.*\)/  \1 needs updating \2/p' \

==== //depot/projects/hammer/lib/libarchive/archive_read_support_format_tar.c#10 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.12 2004/05/18 18:16:30 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_tar.c,v 1.13 2004/05/19 06:35:47 kientzle Exp $");
 
 #include <sys/stat.h>
 #include <errno.h>
@@ -593,21 +593,32 @@
 		 */
 		if (st->st_size > 0)
 			st->st_mode |= S_IFREG;
+
 		/*
-		 * A tricky point: Traditionally, tar programs have
+		 * A tricky point: Traditionally, tar readers have
 		 * ignored the size field when reading hardlink
-		 * entries.  As a result, some programs write non-zero
-		 * sizes, even though the body is empty and expect the
-		 * reader to ignore that.  POSIX.1-2001 broke this by
-		 * permitting hardlink entries to store valid bodies
-		 * in pax interchange format.  Since there is no hard
-		 * and fast way to distinguish pax interchange from
+		 * entries, and some writers put non-zero sizes even
+		 * though the body is empty.  POSIX.1-2001 broke with
+		 * this tradition by permitting hardlink entries to
+		 * store valid bodies in pax interchange format, but
+		 * not in ustar format.  Since there is no hard and
+		 * fast way to distinguish pax interchange from
 		 * earlier archives (the 'x' and 'g' entries are
 		 * optional, after all), we need a heuristic.  Here, I
 		 * use the bid function to test whether or not there's
-		 * a valid header following.
+		 * a valid header following.  Of course, if we know
+		 * this is pax interchange format, then we must obey
+		 * the size.
+		 *
+		 * This heuristic will only fail for a pax interchange
+		 * archive that is storing hardlink bodies, no pax
+		 * extended attribute entries have yet occurred, and
+		 * we encounter a hardlink entry for a file that is
+		 * itself an uncompressed tar archive.
 		 */
-		if (st->st_size > 0  &&  archive_read_format_tar_bid(a) > 50)
+		if (st->st_size > 0  &&
+		    a->archive_format != ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE  &&
+		    archive_read_format_tar_bid(a) > 50)
 			st->st_size = 0;
 		break;
 	case '2': /* Symlink */

==== //depot/projects/hammer/lib/libarchive/tar.5#4 (text+ko) ====

@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libarchive/tar.5,v 1.3 2004/03/23 03:14:01 kientzle Exp $
+.\" $FreeBSD: src/lib/libarchive/tar.5,v 1.4 2004/05/19 06:38:38 kientzle Exp $
 .\"
-.Dd October 1, 2003
+.Dd May 20, 2004
 .Dt TAR 5
 .Os
 .Sh NAME
@@ -68,10 +68,8 @@
 The original tar archive format has been extended many times to
 include additional information that various implementors found
 necessary.
-This section describes a variant that is compatible with
-most historic
-.Nm
-implementations.
+This section describes the variant implemented by the tar command
+included in Seventh Edition Unix.
 .Pp
 The header record for an old-style
 .Nm
@@ -85,22 +83,30 @@
 char size[12];
 char mtime[12];
 char checksum[8];
+char linkflag[1];
+char linkname[100];
 };
 .Ed
-The remaining bytes in the header record are filled with nulls.
+All unused bytes in the header record are filled with nulls.
 .Bl -tag -width indent
 .It Va name
 Pathname, stored as a null-terminated string.
-Some very early implementations only supported regular files.
-However, a common early convention added
+The Unix V7 tar command only stored regular files (including
+hardlinks to those files).
+One common early convention added
 a trailing "/" character to indicate a directory name, allowing
 directory permissions and owner information to be archived and restored.
 .It Va mode
 File mode, stored as an octal number in ASCII.
 .It Va uid , Va gid
-User id and group id of owner, as octal number in ASCII.
+User id and group id of owner, as octal numbers in ASCII.
 .It Va size
 Size of file, as octal number in ASCII.
+For regular files only, this indicates the amount of data
+that follows the header.
+In particular, this field was ignored by early tar implementations
+when extracting hardlinks.
+Modern writers should always store a zero length for hardlink entries.
 .It Va mtime
 Modification time of file, as an octal number in ASCII.
 This indicates the number of seconds since the start of the epoch,
@@ -113,72 +119,41 @@
 then sum all bytes in the header using unsigned arithmetic.
 This field should be stored as six octal digits followed by a null and a space
 character.
-Note that for many years, Sun tar used signed arithmetic
+Note that many early implementations of tar used signed arithmetic
 for the checksum field, which can cause interoperability problems
 when transferring archives between systems.
-This error was propagated to other implementations that used Sun
-tar as a reference.
 Modern robust readers compute the checksum both ways and accept the
 header if either computation matches.
+.It Va linkflag , Va linkname
+In order to preserve hardlinks and conserve tape, a file
+with multiple links is only written to the archive the first
+time it is encountered.
+The next time it is encountered, the
+.Va linkflag
+is set to an ASCII
+.Sq 1
+and the
+.Va linkname
+field holds the first name under which this file appears.
+(Note that regular files have a null value in the
+.Va linkflag
+field.)
 .El
 .Pp
 Early implementations of
 .Nm
 varied in how they terminated these fields.
-Early BSD documentation specified the following: the pathname must
-be null-terminated; the mode, uid, and gid fields must end in a space and a
-null byte; the size and mtime fields must end in a space; the checksum is
-terminated by a null and a space.
+The
+.Nm
+command in Seventh Edition Unix used the following conventions
+(this is also documented in early BSD manpages):
+the pathname must be null-terminated;
+the mode, uid, and gid fields must end in a space and a null byte;
+the size and mtime fields must end in a space;
+the checksum is terminated by a null and a space.
 For best portability, writers of
 .Nm
 archives should fill the numeric fields with leading zeros.
-.Ss Early Extensions
-Very early
-.Nm
-implementations only supported regular files.
-Two early extensions added support for directories, hard links, and
-symbolic links.
-.Pp
-Early
-.Nm
-archives indicated directories by adding a trailing
-.Pa /
-to the name.
-The size field was often used to indicate the total size of all files
-in the directory.
-This was intended to facilitate extraction on systems that pre-allocated
-directory storage; most modern readers should simply ignore the
-size field for directories.
-.Pp
-To support hard links and symbolic links,
-.Va linktype
-and
-.Va linkname
-fields were added:
-.Bd -literal -offset indent
-struct tarfile_entry_common {
-char name[100];
-char mode[8];
-char uid[8];
-char gid[8];
-char size[12];
-char mtime[12];
-char checksum[8];
-char linktype[1];
-char linkname[100];
-};
-.Ed
-.Pp
-The
-.Va linktype
-field indicates the type of entry.
-For backwards compatibility, a NULL
-character here indicates a regular file or directory.
-An ASCII "1" here indicates a hard link entry, ASCII "2" indicates
-a symbolic link.
-The
-.Va linkname
-field holds the name of the file linked to.
 .Ss POSIX Standard Archives
 POSIX 1003.1 defines a standard
 .Nm
@@ -216,12 +191,13 @@
 .Ed
 .Bl -tag -width indent
 .It Va typeflag
-Type of entry.  POSIX adopted the BSD
-.Va linktype
-field and extended it with several new type values:
+Type of entry.  POSIX extended the earlier
+.Va linkflag
+field with several new type values:
 .Bl -tag -width indent -compact
 .It Dq 0
-Regular file. NULL should be treated as a synonym, for compatibility purposes.
+Regular file.
+NULL should be treated as a synonym, for compatibility purposes.
 .It Dq 1
 Hard link.
 .It Dq 2
@@ -245,6 +221,16 @@
 Uppercase letters "A" through "Z" are reserved for custom extensions.
 Note that sockets and whiteout entries are not archivable.
 .El
+It is worth noting that the
+.Va size
+field, in particular, has different meanings depending on the type.
+For regular files, of course, it indicates the amount of data
+following the header.
+For directories, it may be used to indicate the total size of all
+files in the directory, for use by operating systems that pre-allocate
+directory space.
+For all other types, it should be set to zero by writers and ignored
+by readers.
 .It Va magic
 Contains the magic value
 .Dq ustar
@@ -407,15 +393,28 @@
 The
 .Cm g
 entry is not widely used.
+.Pp
+Besides the new
+.Cm x
+and
+.Cm g
+entries, the pax interchange format has a few other minor variations
+from the earlier ustar format.
+The most troubling one is that hardlinks are permitted to have
+data following them.
+This allows readers to restore any hardlink to a file without
+having to rewind the archive to find an earlier entry.
+However, it creates complications for robust readers, as it is
+no longer clear whether or not they should ignore the size
+field for hardlink entries.
 .Ss GNU Tar Archives
-The GNU tar program added new features by starting with an early draft
-of POSIX and using three different extension mechanisms:  They added
-new fields to the empty space in the header (some of which was later
+The GNU tar program has used a variety of different extension
+mechanisms over the years:
+They added new fields to the empty space in the header (some of which was later
 used by POSIX for conflicting purposes);
-they allowed the header to
-be continued over multiple records;
-and they defined new entries
-that modify following entries (similar in principle to the
+they allowed the header to be continued over multiple records;
+and they defined new entries that modify following entries
+(similar in principle to the
 .Cm x
 entry described above, but each GNU special entry is single-purpose,
 unlike the general-purpose
@@ -456,7 +455,8 @@
 .Ed
 .Bl -tag -width indent
 .It Va typeflag
-GNU tar uses the following special entry types.
+GNU tar uses the following special entry types, in addition to
+those defined by POSIX:
 .Bl -tag -width indent
 .It "7"
 GNU tar treats type "7" records identically to type "0" records,
@@ -634,8 +634,10 @@
 .Sh STANDARDS
 The
 .Nm tar
-utility is no longer a part of any official standard.
-It last appeared in SUSv2.
+utility is no longer a part of POSIX or the Single Unix Standard.
+It last appeared in
+.St -p 1003.1-1997
+(SUSv2).
 It has been supplanted in subsequent standards by
 .Xr pax 1 .
 The ustar format is defined in
@@ -648,7 +650,7 @@
 .Sh HISTORY
 A
 .Nm tar
-command appeared in Sixth Edition Unix.
+command appeared in Seventh Edition Unix, which was released in January, 1979.
 John Gilmore's
 .Nm pdtar
 public-domain implementation (circa 1987) was highly influential

==== //depot/projects/hammer/lib/libc/gmon/Makefile.inc#6 (text+ko) ====

@@ -1,5 +1,5 @@
 #	from @(#)Makefile.inc	8.1 (Berkeley) 6/4/93
-# $FreeBSD: src/lib/libc/gmon/Makefile.inc,v 1.9 2002/11/18 09:50:55 ru Exp $
+# $FreeBSD: src/lib/libc/gmon/Makefile.inc,v 1.10 2004/05/18 22:49:15 peter Exp $
 
 # gmon sources
 .PATH: ${.CURDIR}/gmon

==== //depot/projects/hammer/lib/libc/sys/mlock.2#4 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)mlock.2	8.2 (Berkeley) 12/11/93
-.\" $FreeBSD: src/lib/libc/sys/mlock.2,v 1.14 2002/12/19 09:40:25 ru Exp $
+.\" $FreeBSD: src/lib/libc/sys/mlock.2,v 1.15 2004/05/19 03:25:17 alc Exp $
 .\"
 .Dd June 2, 1993
 .Dt MLOCK 2
@@ -148,16 +148,6 @@
 .Xr setrlimit 2 ,
 .Xr getpagesize 3
 .Sh BUGS
-Unlike The Sun implementation, multiple
-.Fn mlock
-calls on the same address range require the corresponding number of
-.Fn munlock
-calls to actually unlock the pages, i.e.\&
-.Fn mlock
-nests.
-This should be considered a consequence of the implementation
-and not a feature.
-.Pp
 The per-process resource limit is a limit on the amount of virtual
 memory locked, while the system-wide limit is for the number of locked
 physical pages.

==== //depot/projects/hammer/share/man/man4/ng_hole.4#2 (text+ko) ====

@@ -32,10 +32,10 @@
 .\"
 .\" Author: Archie Cobbs <archie@FreeBSD.org>
 .\"
-.\" $FreeBSD: src/share/man/man4/ng_hole.4,v 1.10 2001/10/01 16:09:21 ru Exp $
+.\" $FreeBSD: src/share/man/man4/ng_hole.4,v 1.11 2004/05/19 11:26:33 ru Exp $
 .\" $Whistle: ng_hole.8,v 1.4 1999/01/25 23:46:26 archie Exp $
 .\"
-.Dd January 19, 1999
+.Dd May 19, 2004
 .Dt NG_HOLE 4
 .Os
 .Sh NAME
@@ -54,8 +54,25 @@
 node accepts any request to connect, regardless of the hook name,
 as long as the name is unique.
 .Sh CONTROL MESSAGES
-This node type supports only the generic control messages.
-Other control messages are silently discarded.
+This node type supports the generic control messages, plus the
+following:
+.Bl -tag -width indent
+.It Dv NGM_BPF_GET_STATS
+This command takes an
+.Tn ASCII
+string argument, the hook name, and returns the statistics
+associated with the hook as a
+.Vt "struct ng_hole_hookstat" .
+.It Dv NGM_BPF_CLR_STATS
+This command takes an
+.Tn ASCII
+string argument, the hook name, and clears the statistics
+associated with the hook.
+.It Dv NGM_BPF_GETCLR_STATS
+This command is identical to
+.Dv NGM_BPF_GET_STATS ,
+except that the statistics are also atomically cleared.
+.El
 .Sh SHUTDOWN
 This node shuts down upon receipt of a
 .Dv NGM_SHUTDOWN

==== //depot/projects/hammer/sys/alpha/include/profile.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/alpha/include/profile.h,v 1.5 2002/03/20 18:58:45 obrien Exp $ */
+/* $FreeBSD: src/sys/alpha/include/profile.h,v 1.6 2004/05/19 15:41:25 bde Exp $ */
 /* From: NetBSD: profile.h,v 1.9 1997/04/06 08:47:37 cgd Exp */
 
 /*
@@ -220,18 +220,6 @@
 #define MCOUNT_EXIT(s) \
 	(void)_alpha_pal_swpipl(s);
 #define	MCOUNT_DECL(s)	u_long s;
-#ifdef GUPROF
-struct gmonparam;
-
-void	nullfunc_loop_profiled(void);
-void	nullfunc_profiled(void);
-void	startguprof(struct gmonparam *p);
-void	stopguprof(struct gmonparam *p);
-#else
-#define startguprof(p)
-#define stopguprof(p)
-#endif /* GUPROF */
-
 #else /* !_KERNEL */
 typedef u_long	uintfptr_t;
 #endif

==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#86 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.606 2004/05/18 05:30:06 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.607 2004/05/19 01:23:48 peter Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -1138,8 +1138,10 @@
 		kmdp = preload_search_by_type("elf64 kernel");
 	boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
 	kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *) + KERNBASE;
+#ifdef DDB
 	ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, void *);
 	ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, void *);
+#endif
 
 	/* Init basic tunables, hz etc */
 	init_param1();

==== //depot/projects/hammer/sys/amd64/include/profile.h#16 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)profile.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/amd64/include/profile.h,v 1.35 2004/05/18 22:52:32 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/profile.h,v 1.38 2004/05/19 16:19:11 bde Exp $
  */
 
 #ifndef _MACHINE_PROFILE_H_
@@ -50,13 +50,9 @@
 #define	MCOUNT
 
 #ifdef GUPROF
-#define	CALIB_SCALE	1000
-#define	KCOUNT(p,index)	((p)->kcount[(index) \
-			 / (HISTFRACTION * sizeof(HISTCOUNTER))])
 #define	MCOUNT_DECL(s)
 #define	MCOUNT_ENTER(s)
 #define	MCOUNT_EXIT(s)
-#define	PC_TO_I(p, pc)	((uintfptr_t)(pc) - (uintfptr_t)(p)->lowpc)
 #else
 #define	MCOUNT_DECL(s)	u_long s;
 #ifdef SMP
@@ -81,12 +77,12 @@
 static void _mcount
 
 #ifdef	__GNUC__
-#define	MCOUNT __asm ("			\n\
+#define	MCOUNT __asm("			\n\
 	.globl	.mcount			\n\
 	.type	.mcount @function	\n\
 .mcount:				\n\
 	pushq	%rbp			\n\
-	movq	%rsp, %rbp		\n\
+	movq	%rsp,%rbp		\n\
 	pushq	%rdi			\n\
 	pushq	%rsi			\n\
 	pushq	%rdx			\n\
@@ -127,7 +123,7 @@
 	__asm("movq 8(%%rbp),%0" : "=r" (selfpc));			\
 	/*								\
 	 * frompc = pc pushed by call to mcount's caller.		\
-	 * The caller's stack frame has already been built, so %ebp is	\
+	 * The caller's stack frame has already been built, so %rbp is	\
 	 * the caller's frame pointer.  The caller's raddr is in the	\
 	 * caller's frame following the caller's caller's frame pointer.\
 	 */								\
@@ -136,15 +132,15 @@
 	_mcount(frompc, selfpc);					\
 }
 #endif
-#else	/* __GNUC__ */
-#define	MCOUNT		\
-void			\
-mcount()		\
-{			\
+#else /* !__GNUC__ */
+#define	MCOUNT								\
+void									\
+mcount()								\
+{									\
 }
-#endif	/* __GNUC__ */
+#endif /* __GNUC__ */
 
-typedef	unsigned long	uintfptr_t;
+typedef	u_long	uintfptr_t;
 
 #endif /* _KERNEL */
 
@@ -152,24 +148,11 @@
  * An unsigned integral type that can hold non-negative difference between
  * function pointers.
  */
-typedef	u_int	fptrdiff_t;
+typedef	u_long	fptrdiff_t;
 
 #ifdef _KERNEL
 
 void	mcount(uintfptr_t frompc, uintfptr_t selfpc);
-void	kmupetext(uintfptr_t nhighpc);
-
-#ifdef GUPROF
-struct gmonparam;
-
-void	nullfunc_loop_profiled(void);
-void	nullfunc_profiled(void);
-void	startguprof(struct gmonparam *p);
-void	stopguprof(struct gmonparam *p);
-#else
-#define	startguprof(p)
-#define	stopguprof(p)
-#endif /* GUPROF */
 
 #else /* !_KERNEL */
 
@@ -183,17 +166,4 @@
 
 #endif /* _KERNEL */
 
-#ifdef GUPROF
-/* XXX doesn't quite work outside kernel yet. */
-extern int	cputime_bias;
-
-__BEGIN_DECLS
-int	cputime(void);
-void	empty_loop(void);
-void	mexitcount(uintfptr_t selfpc);
-void	nullfunc(void);
-void	nullfunc_loop(void);
-__END_DECLS
-#endif
-
 #endif /* !_MACHINE_PROFILE_H_ */

==== //depot/projects/hammer/sys/arm/include/profile.h#2 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)profile.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/arm/include/profile.h,v 1.1 2004/05/14 11:46:44 cognet Exp $
+ * $FreeBSD: src/sys/arm/include/profile.h,v 1.2 2004/05/19 15:41:25 bde Exp $
  */
 
 #ifndef _MACHINE_PROFILE_H_
@@ -54,13 +54,9 @@
 #define	MCOUNT
 
 #ifdef GUPROF
-#define	CALIB_SCALE	1000
-#define	KCOUNT(p,index)	((p)->kcount[(index) \
-			 / (HISTFRACTION * sizeof(HISTCOUNTER))])
 #define	MCOUNT_DECL(s)
 #define	MCOUNT_ENTER(s)
 #define	MCOUNT_EXIT(s)
-#define	PC_TO_I(p, pc)	((uintfptr_t)(pc) - (uintfptr_t)(p)->lowpc)
 #else
 #define	MCOUNT_DECL(s)	u_long s;
 #ifdef SMP
@@ -97,19 +93,6 @@
 #ifdef _KERNEL
 
 void	mcount(uintfptr_t frompc, uintfptr_t selfpc);
-void	kmupetext(uintfptr_t nhighpc);
-
-#ifdef GUPROF
-struct gmonparam;
-
-void	nullfunc_loop_profiled(void);
-void	nullfunc_profiled(void);
-void	startguprof(struct gmonparam *p);
-void	stopguprof(struct gmonparam *p);
-#else
-#define	startguprof(p)
-#define	stopguprof(p)
-#endif /* GUPROF */
 
 #else /* !_KERNEL */
 
@@ -123,17 +106,4 @@
 
 #endif /* _KERNEL */
 
-#ifdef GUPROF
-/* XXX doesn't quite work outside kernel yet. */
-extern int	cputime_bias;
-
-__BEGIN_DECLS
-int	cputime(void);
-void	empty_loop(void);
-void	mexitcount(uintfptr_t selfpc);
-void	nullfunc(void);
-void	nullfunc_loop(void);
-__END_DECLS
-#endif
-
 #endif /* !_MACHINE_PROFILE_H_ */

==== //depot/projects/hammer/sys/i386/include/profile.h#8 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)profile.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD: src/sys/i386/include/profile.h,v 1.34 2004/04/07 20:46:05 imp Exp $
+ * $FreeBSD: src/sys/i386/include/profile.h,v 1.36 2004/05/19 16:04:26 bde Exp $
  */
 
 #ifndef _MACHINE_PROFILE_H_
@@ -50,13 +50,9 @@
 #define	MCOUNT
 
 #ifdef GUPROF
-#define	CALIB_SCALE	1000
-#define	KCOUNT(p,index)	((p)->kcount[(index) \
-			 / (HISTFRACTION * sizeof(HISTCOUNTER))])
 #define	MCOUNT_DECL(s)
 #define	MCOUNT_ENTER(s)
 #define	MCOUNT_EXIT(s)
-#define	PC_TO_I(p, pc)	((uintfptr_t)(pc) - (uintfptr_t)(p)->lowpc)
 #else
 #define	MCOUNT_DECL(s)	u_long s;
 #ifdef SMP
@@ -97,19 +93,19 @@
 	 * the caller's frame pointer.  The caller's raddr is in the	\
 	 * caller's frame following the caller's caller's frame pointer.\
 	 */								\
-	__asm("movl (%%ebp),%0" : "=r" (frompc));				\
+	__asm("movl (%%ebp),%0" : "=r" (frompc));			\
 	frompc = ((uintfptr_t *)frompc)[1];				\
 	_mcount(frompc, selfpc);					\
 }
-#else	/* !(__GNUC__ || __INTEL_COMPILER) */
-#define	MCOUNT		\
-void			\
-mcount()		\
-{			\
+#else /* !(__GNUC__ || __INTEL_COMPILER) */
+void									\
+#define	MCOUNT								\
+mcount()								\
+{									\
 }
-#endif	/* __GNUC__ || __INTEL_COMPILER */
+#endif /* __GNUC__ || __INTEL_COMPILER */
 
-typedef	unsigned int	uintfptr_t;
+typedef	u_int	uintfptr_t;
 
 #endif /* _KERNEL */
 
@@ -122,19 +118,6 @@
 #ifdef _KERNEL
 
 void	mcount(uintfptr_t frompc, uintfptr_t selfpc);
-void	kmupetext(uintfptr_t nhighpc);
-
-#ifdef GUPROF
-struct gmonparam;
-
-void	nullfunc_loop_profiled(void);
-void	nullfunc_profiled(void);
-void	startguprof(struct gmonparam *p);
-void	stopguprof(struct gmonparam *p);
-#else
-#define	startguprof(p)
-#define	stopguprof(p)
-#endif /* GUPROF */
 
 #else /* !_KERNEL */
 
@@ -148,17 +131,4 @@
 
 #endif /* _KERNEL */
 
-#ifdef GUPROF
-/* XXX doesn't quite work outside kernel yet. */
-extern int	cputime_bias;
-
-__BEGIN_DECLS
-int	cputime(void);
-void	empty_loop(void);
-void	mexitcount(uintfptr_t selfpc);
-void	nullfunc(void);
-void	nullfunc_loop(void);
-__END_DECLS
-#endif
-
 #endif /* !_MACHINE_PROFILE_H_ */

==== //depot/projects/hammer/sys/ia64/include/profile.h#2 (text+ko) ====

@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/ia64/include/profile.h,v 1.7 2002/03/21 09:50:11 dfr Exp $ */
+/* $FreeBSD: src/sys/ia64/include/profile.h,v 1.8 2004/05/19 15:41:25 bde Exp $ */
 /* From: NetBSD: profile.h,v 1.9 1997/04/06 08:47:37 cgd Exp */
 
 /*
@@ -104,18 +104,6 @@
 #define MCOUNT_EXIT(s) \n\
 	intr_restore(_c)
 #define	MCOUNT_DECL(s)	register_t c;
-#ifdef GUPROF
-struct gmonparam;
-
-void	nullfunc_loop_profiled(void);
-void	nullfunc_profiled(void);
-void	startguprof(struct gmonparam *p);
-void	stopguprof(struct gmonparam *p);
-#else
-#define startguprof(p)
-#define stopguprof(p)
-#endif /* GUPROF */
-
 #else /* !_KERNEL */
 typedef u_long	uintfptr_t;
 #endif

==== //depot/projects/hammer/sys/kern/link_elf.c#18 (text+ko) ====

@@ -25,13 +25,16 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/link_elf.c,v 1.77 2004/05/16 20:00:28 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/link_elf.c,v 1.78 2004/05/19 14:36:38 bde Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mac.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#ifdef GPROF
+#include <sys/gmon.h>
+#endif
 #include <sys/kernel.h>
 #include <sys/lock.h>
 #include <sys/mac.h>
@@ -44,9 +47,6 @@
 #include <sys/linker.h>
 
 #include <machine/elf.h>
-#ifdef GPROF
-#include <machine/profile.h>
-#endif
 
 #include <vm/vm.h>
 #include <vm/vm_param.h>

==== //depot/projects/hammer/sys/kern/uipc_socket2.c#15 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_socket2.c,v 1.123 2004/04/05 21:03:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_socket2.c,v 1.124 2004/05/19 00:22:10 ps Exp $");
 
 #include "opt_mac.h"
 #include "opt_param.h"
@@ -223,7 +223,7 @@
 	}
 	if (connstatus) {
 		sorwakeup(head);
-		wakeup(&head->so_timeo);
+		wakeup_one(&head->so_timeo);
 		so->so_state |= connstatus;
 	}
 	return (so);

==== //depot/projects/hammer/sys/netgraph/ng_hole.c#2 (text+ko) ====

@@ -36,7 +36,7 @@
  *
  * Author: Julian Elisher <julian@freebsd.org>
  *
- * $FreeBSD: src/sys/netgraph/ng_hole.c,v 1.10 2001/01/08 05:34:06 julian Exp $
+ * $FreeBSD: src/sys/netgraph/ng_hole.c,v 1.11 2004/05/19 11:26:33 ru Exp $
  * $Whistle: ng_hole.c,v 1.10 1999/11/01 09:24:51 julian Exp $
  */
 
@@ -51,10 +51,53 @@
 #include <sys/mbuf.h>
 #include <netgraph/ng_message.h>
 #include <netgraph/netgraph.h>
+#include <netgraph/ng_parse.h>
 #include <netgraph/ng_hole.h>
 
+/* Per hook private info. */
+struct ng_hole_hookinfo {
+	struct ng_hole_hookstat	stats;
+};
+typedef struct ng_hole_hookinfo *hinfo_p;
+
+/* Parse type for struct ng_hole_hookstat. */
+static const struct ng_parse_struct_field ng_hole_hookstat_type_fields[] =
+	NG_HOLE_HOOKSTAT_TYPE_INFO;
+static const struct ng_parse_type ng_hole_hookstat_type = {
+	&ng_parse_struct_type,
+	&ng_hole_hookstat_type_fields
+};
+
+/* List of commands and how to convert arguments to/from ASCII. */
+static const struct ng_cmdlist ng_hole_cmdlist[] = {
+	{
+	  NGM_HOLE_COOKIE,
+	  NGM_HOLE_GET_STATS,
+	  "getstats",
+	  &ng_parse_hookbuf_type,
+	  &ng_hole_hookstat_type
+	},
+	{
+	  NGM_HOLE_COOKIE,
+	  NGM_HOLE_CLR_STATS,
+	  "clrstats",
+	  &ng_parse_hookbuf_type,
+	  NULL
+	},
+	{
+	  NGM_HOLE_COOKIE,
+	  NGM_HOLE_GETCLR_STATS,
+	  "getclrstats",
+	  &ng_parse_hookbuf_type,
+	  &ng_hole_hookstat_type
+	},
+	{ 0 }
+};
+
 /* Netgraph methods */
 static ng_constructor_t	ngh_cons;
+static ng_rcvmsg_t	ngh_rcvmsg;
+static ng_newhook_t	ngh_newhook;
 static ng_rcvdata_t	ngh_rcvdata;
 static ng_disconnect_t	ngh_disconnect;
 
@@ -63,14 +106,14 @@
 	NG_HOLE_NODE_TYPE,
 	NULL,		/* modeventhand_t */
 	ngh_cons,	/* ng_constructor_t */
-	NULL,		/* ng_rcvmsg_t */
+	ngh_rcvmsg,	/* ng_rcvmsg_t */
 	NULL,		/* ng_shutdown_t */
-	NULL,		/* ng_newhook_t */
+	ngh_newhook,	/* ng_newhook_t */
 	NULL,		/* ng_findhook_t */

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405191719.i4JHJTWY013256>