summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortrociny <trociny@FreeBSD.org>2013-04-20 07:52:23 +0000
committertrociny <trociny@FreeBSD.org>2013-04-20 07:52:23 +0000
commit52df6246c7718931beb8fcc43b4ebb5fd64ccd6e (patch)
tree5de26348b74c562ba116e705a1ce12e6d71567b6 /usr.bin
parentfa358c9395f76c582b77c7c26175b39a015f4488 (diff)
downloadFreeBSD-src-52df6246c7718931beb8fcc43b4ebb5fd64ccd6e.zip
FreeBSD-src-52df6246c7718931beb8fcc43b4ebb5fd64ccd6e.tar.gz
Use more generic procstat_getvmmap(3) for retrieving VM layout of a process.
MFC after: 1 month
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/procstat/procstat.c2
-rw-r--r--usr.bin/procstat/procstat.h2
-rw-r--r--usr.bin/procstat/procstat_vm.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/procstat/procstat.c b/usr.bin/procstat/procstat.c
index 6b95246..4e35412 100644
--- a/usr.bin/procstat/procstat.c
+++ b/usr.bin/procstat/procstat.c
@@ -79,7 +79,7 @@ procstat(struct procstat *prstat, struct kinfo_proc *kipp)
else if (tflag)
procstat_threads(prstat, kipp);
else if (vflag)
- procstat_vm(kipp);
+ procstat_vm(prstat, kipp);
else if (xflag)
procstat_auxv(kipp);
else
diff --git a/usr.bin/procstat/procstat.h b/usr.bin/procstat/procstat.h
index 718eb47..391f187 100644
--- a/usr.bin/procstat/procstat.h
+++ b/usr.bin/procstat/procstat.h
@@ -46,6 +46,6 @@ void procstat_rlimit(struct kinfo_proc *kipp);
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 */
diff --git a/usr.bin/procstat/procstat_vm.c b/usr.bin/procstat/procstat_vm.c
index 66f29ae..d44b9c2 100644
--- a/usr.bin/procstat/procstat_vm.c
+++ b/usr.bin/procstat/procstat_vm.c
@@ -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++) {
OpenPOWER on IntegriCloud