PERFORCE change 152136 for review
Peter Wemm
peter at FreeBSD.org
Wed Oct 29 01:28:08 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=152136
Change 152136 by peter at 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);
More information about the p4-projects
mailing list