Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2008 01:28:07 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 152136 for review
Message-ID:  <200810290128.m9T1S7aQ019143@repoman.freebsd.org>

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

Change 152136 by peter@peter_overcee on 2008/10/29 01:27:40

	Report object offsets in -v output

Affected files ...

.. //depot/projects/hammer/usr.bin/procstat/procstat_vm.c#3 edit

Differences ...

==== //depot/projects/hammer/usr.bin/procstat/procstat_vm.c#3 (text+ko) ====

@@ -41,16 +41,17 @@
 procstat_vm(pid_t pid, struct kinfo_proc *kipp __unused)
 {
 	struct kinfo_vmentry *freep, *kve;
-	int error, name[4], ptrwidth;
+	int error, name[4], ptrwidth, offwidth;
 	unsigned int i;
 	const char *str;
 	size_t len;
 
 	ptrwidth = 2*sizeof(void *) + 2;
+	offwidth = 2*sizeof(off_t) + 2;
 	if (!hflag)
-		printf("%5s %*s %*s %3s %4s %4s %3s %3s %2s %-2s %-s\n",
+		printf("%5s %*s %*s %3s %4s %4s %3s %3s %2s %-2s %*s %-s\n",
 		    "PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES",
-		    "PRES", "REF", "SHD", "FL", "TP", "PATH");
+		    "PRES", "REF", "SHD", "FL", "TP", offwidth, "OFFSET", "PATH");
 
 	name[0] = CTL_KERN;
 	name[1] = KERN_PROC;
@@ -125,6 +126,7 @@
 			break;
 		}
 		printf("%-2s ", str);
+		printf("%#*llx ", offwidth, (unsigned long long)kve->kve_offset);
 		printf("%-s\n", kve->kve_path);
 	}
 	free(freep);



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