PERFORCE change 152135 for review

Peter Wemm peter at FreeBSD.org
Wed Oct 29 00:55:35 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=152135

Change 152135 by peter at 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. */
 };
 


More information about the p4-projects mailing list