Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2008 00:55:34 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 152135 for review
Message-ID:  <200810290055.m9T0tYGA015477@repoman.freebsd.org>

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

Change 152135 by peter@peter_overcee on 2008/10/29 00:55:04

	Export the object offset to procstat.

Affected files ...

.. //depot/projects/hammer/sys/kern/kern_proc.c#73 edit
.. //depot/projects/hammer/sys/sys/user.h#28 edit

Differences ...

==== //depot/projects/hammer/sys/kern/kern_proc.c#73 (text+ko) ====

@@ -1451,6 +1451,7 @@
 
 		kve->kve_start = (void*)entry->start;
 		kve->kve_end = (void*)entry->end;
+		kve->kve_offset = (off_t)entry->offset;
 
 		if (entry->protection & VM_PROT_READ)
 			kve->kve_protection |= KVME_PROT_READ;

==== //depot/projects/hammer/sys/sys/user.h#28 (text+ko) ====

@@ -325,7 +325,11 @@
 	int	 kve_ref_count;			/* VM obj ref count. */
 	int	 kve_shadow_count;		/* VM obj shadow count. */
 	char	 kve_path[PATH_MAX];		/* Path to VM obj, if any. */
-	void	*_kve_pspare[8];		/* Space for more stuff. */
+	off_t	 kve_offset;			/* Mapping offset within object */
+	/* Similar hack to struct stat.  See notes there. */
+	unsigned int :(8 / 2) * ((2 * (int)sizeof(void *)) - (int)sizeof(off_t));
+	unsigned int :(8 / 2) * ((2 * (int)sizeof(void *)) - (int)sizeof(off_t));
+	void	*_kve_pspare[6];		/* Space for more stuff. */
 	int	 _kve_ispare[8];		/* Space for more stuff. */
 };
 



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