Author: trociny Date: Sat Apr 20 07:52:23 2013 New Revision: 249669 URL: http://svnweb.freebsd.org/changeset/base/249669
Log: Use more generic procstat_getvmmap(3) for retrieving VM layout of a process. MFC after: 1 month Modified: head/usr.bin/procstat/procstat.c head/usr.bin/procstat/procstat.h head/usr.bin/procstat/procstat_vm.c Modified: head/usr.bin/procstat/procstat.c ============================================================================== --- head/usr.bin/procstat/procstat.c Sat Apr 20 07:50:59 2013 (r249668) +++ head/usr.bin/procstat/procstat.c Sat Apr 20 07:52:23 2013 (r249669) @@ -79,7 +79,7 @@ procstat(struct procstat *prstat, struct else if (tflag) procstat_threads(prstat, kipp); else if (vflag) - procstat_vm(kipp); + procstat_vm(prstat, kipp); else if (xflag) procstat_auxv(kipp); else Modified: head/usr.bin/procstat/procstat.h ============================================================================== --- head/usr.bin/procstat/procstat.h Sat Apr 20 07:50:59 2013 (r249668) +++ head/usr.bin/procstat/procstat.h Sat Apr 20 07:52:23 2013 (r249669) @@ -46,6 +46,6 @@ void procstat_rlimit(struct kinfo_proc * void procstat_sigs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_threads_sigs(struct procstat *prstat, struct kinfo_proc *kipp); -void procstat_vm(struct kinfo_proc *kipp); +void procstat_vm(struct procstat *prstat, struct kinfo_proc *kipp); #endif /* !PROCSTAT_H */ Modified: head/usr.bin/procstat/procstat_vm.c ============================================================================== --- head/usr.bin/procstat/procstat_vm.c Sat Apr 20 07:50:59 2013 (r249668) +++ head/usr.bin/procstat/procstat_vm.c Sat Apr 20 07:52:23 2013 (r249669) @@ -41,7 +41,7 @@ #include "procstat.h" void -procstat_vm(struct kinfo_proc *kipp) +procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp) { struct kinfo_vmentry *freep, *kve; int ptrwidth; @@ -54,7 +54,7 @@ procstat_vm(struct kinfo_proc *kipp) "PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES", "PRES", "REF", "SHD", "FL", "TP", "PATH"); - freep = kinfo_getvmmap(kipp->ki_pid, &cnt); + freep = procstat_getvmmap(procstat, kipp, &cnt); if (freep == NULL) return; for (i = 0; i < cnt; i++) { _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"