diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-26 15:35:35 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-02-26 15:35:35 +0800 |
commit | d0114d110d848e75fba3145961e924b07366387a (patch) | |
tree | 3150c3acc41dbbb3ab1805114be5574c6d5cb6e7 /devel | |
parent | 9481caeac4bc2b613539c3964b4fe3d284da3aae (diff) | |
download | marcuscom-ports-d0114d110d848e75fba3145961e924b07366387a.tar.gz marcuscom-ports-d0114d110d848e75fba3145961e924b07366387a.tar.zst marcuscom-ports-d0114d110d848e75fba3145961e924b07366387a.zip |
Do a little more cleanup in the per-process statistics. Really, one should
just use top to get accurate numbers. Someome with some real libgtop love
needs to come along and really fix a lot of this.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@3709 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c index 0713da619..cbbc07042 100644 --- a/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c +++ b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c @@ -1,30 +1,20 @@ ---- sysdeps/freebsd/procmem.c.orig Mon Jul 19 02:07:03 2004 -+++ sysdeps/freebsd/procmem.c Tue Jul 20 22:03:29 2004 -@@ -125,7 +125,7 @@ +--- sysdeps/freebsd/procmem.c.orig Fri Sep 24 18:49:06 2004 ++++ sysdeps/freebsd/procmem.c Sat Feb 26 02:24:39 2005 +@@ -31,7 +31,7 @@ + #include <sys/param.h> + #include <sys/proc.h> + #include <sys/resource.h> +-#ifdef __NetBSD__ && (__NetBSD_Version__ >= 105020000) ++#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000) + #include <uvm/uvm_extern.h> #else - struct vm_object object; + #include <vm/vm_object.h> +@@ -47,7 +47,7 @@ + #include <sys/user.h> #endif -- struct plimit plimit; -+ struct rlimit rlimit; - int count; - - glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0); -@@ -160,15 +160,12 @@ - - #define PROC_VMSPACE kp_proc.p_vmspace - -- if (kvm_read (server->machine.kd, -- (unsigned long) pinfo [0].PROC_VMSPACE, -- (char *) &plimit, sizeof (plimit)) != sizeof (plimit)) { -- glibtop_warn_io_r (server, "kvm_read (plimit)"); -+ if (getrlimit (RLIMIT_RSS, &rlimit) < 0) { -+ glibtop_warn_io_r (server, "getrlimit"); - return; - } - -- buf->rss_rlim = (guint64) -- (plimit.pl_rlimit [RLIMIT_RSS].rlim_cur); -+ buf->rss_rlim = (u_int64_t) (rlimit.rlim_cur); - - vms = &pinfo [0].kp_eproc.e_vm; - + #include <sys/sysctl.h> +-#ifdef __NetBSD__ && (__NetBSD_Version__ >= 105020000) ++#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000) + #include <uvm/uvm.h> + #else + #include <vm/vm.h> |