head 1.5; access; symbols pkgsrc-2023Q4:1.5.0.54 pkgsrc-2023Q4-base:1.5 pkgsrc-2023Q3:1.5.0.52 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.50 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.48 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.5.0.46 pkgsrc-2022Q4-base:1.5 pkgsrc-2022Q3:1.5.0.44 pkgsrc-2022Q3-base:1.5 pkgsrc-2022Q2:1.5.0.42 pkgsrc-2022Q2-base:1.5 pkgsrc-2022Q1:1.5.0.40 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.38 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.5.0.36 pkgsrc-2021Q3-base:1.5 pkgsrc-2021Q2:1.5.0.34 pkgsrc-2021Q2-base:1.5 pkgsrc-2021Q1:1.5.0.32 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.5.0.30 pkgsrc-2020Q4-base:1.5 pkgsrc-2020Q3:1.5.0.28 pkgsrc-2020Q3-base:1.5 pkgsrc-2020Q2:1.5.0.24 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.5.0.4 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.26 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.22 pkgsrc-2019Q3-base:1.5 pkgsrc-2019Q2:1.5.0.20 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.18 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.16 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.14 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.12 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.10 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.8 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.6 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.2 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.4.0.80 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.78 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.4.0.76 pkgsrc-2016Q3-base:1.4 pkgsrc-2016Q2:1.4.0.74 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.72 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.70 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.68 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.66 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.64 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.62 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.60 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.58 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.56 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.54 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.52 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.50 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.48 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.46 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.44 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.42 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.40 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.38 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.36 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.34 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.32 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.30 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.28 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.26 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.24 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.22 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.20 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.18 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.16 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.14 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.12 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.10 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.8 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.6 pkgsrc-2008Q1:1.4.0.4 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.2 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.3.0.2 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.2.0.30 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.28 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.26 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.24 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.22 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.20 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.18 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.16 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.14 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.12 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.10 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.8 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.6 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.4 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2 buildlink2-base:1.2 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.5 date 2017.06.23.16.42.05; author kamil; state Exp; branches; next 1.4; commitid IKgDmhFKvn0NawWz; 1.4 date 2007.11.05.19.06.04; author drochner; state Exp; branches; next 1.3; 1.3 date 2007.09.20.21.12.09; author wiz; state Exp; branches; next 1.2; 1.2 date 98.11.01.23.24.18; author tron; state dead; branches; next 1.1; 1.1 date 98.10.07.13.11.35; author agc; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 98.10.07.13.11.35; author agc; state Exp; branches; next ; desc @@ 1.5 log @Correct build failure on NetBSD 8.99.1 Fallout from removal. @ text @$NetBSD: patch-ai,v 1.4 2007/11/05 19:06:04 drochner Exp $ --- sysdeps/bsd/prockernel.c.orig 2011-06-01 15:40:47.000000000 +0000 +++ sysdeps/bsd/prockernel.c @@@@ -30,7 +30,7 @@@@ #include #include #include -#if (!defined __OpenBSD__) && (!defined __bsdi__) +#if (!defined __OpenBSD__) && (!defined __bsdi__) && (!defined __NetBSD__) #include #endif #if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) && \ @@@@ -45,6 +45,7 @@@@ #include #endif +#if 0 #ifdef __NetBSD__ #include #include @@@@ -60,17 +61,22 @@@@ #define KERNBASE KERNEL_BASE #endif #endif - +#endif /* 0 */ static const unsigned long _glibtop_sysdeps_proc_kernel_pstats = (1L << GLIBTOP_PROC_KERNEL_MIN_FLT) + -(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + -(1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) + -(1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT); +(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) +#if !defined(__NetBSD__) ++ (1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) + +(1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT) +#endif +; +#if !defined(__NetBSD__) static const unsigned long _glibtop_sysdeps_proc_kernel_pcb = (1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) + (1L << GLIBTOP_PROC_KERNEL_KSTK_ESP); +#endif static const unsigned long _glibtop_sysdeps_proc_kernel_wchan = (1L << GLIBTOP_PROC_KERNEL_NWCHAN) + @@@@ -82,7 +88,9 @@@@ void _glibtop_init_proc_kernel_p (glibtop *server) { server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel_pstats | +#if !defined(__NetBSD__) _glibtop_sysdeps_proc_kernel_pcb | +#endif _glibtop_sysdeps_proc_kernel_wchan; } @@@@ -91,12 +99,16 @@@@ glibtop_get_proc_kernel_p (glibtop *serv glibtop_proc_kernel *buf, pid_t pid) { +#if defined(__NetBSD__) + struct kinfo_proc2 *pinfo; +#else struct kinfo_proc *pinfo; #if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) struct user *u_addr = (struct user *)USRSTACK; struct pstats pstats; struct pcb pcb; #endif +#endif /* NetBSD */ int count; char filename [BUFSIZ]; @@@@ -113,7 +125,12 @@@@ glibtop_get_proc_kernel_p (glibtop *serv if (pid == 0) return; /* Get the process information */ +#if defined(__NetBSD__) + pinfo = kvm_getproc2 (server->machine.kd, KERN_PROC_PID, pid, + sizeof(*pinfo), &count); +#else pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count); +#endif if ((pinfo == NULL) || (count != 1)) { glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid); return; @@@@ -125,6 +142,10 @@@@ glibtop_get_proc_kernel_p (glibtop *serv #define PROC_WMESG ki_wmesg #define PROC_WMESG ki_wmesg +#elif defined(__NetBSD__) + +/* nothing for now */ + #else #define PROC_WCHAN kp_proc.p_wchan @@@@ -133,6 +154,21 @@@@ glibtop_get_proc_kernel_p (glibtop *serv #endif +#if defined(__NetBSD__) + + buf->nwchan = pinfo[0].p_wchan; + if (pinfo[0].p_wchan && pinfo[0].p_wmesg) + g_strlcpy(buf->wchan, pinfo[0].p_wmesg, + sizeof buf->wchan); + + buf->min_flt = pinfo[0].p_uru_minflt; + buf->maj_flt = pinfo[0].p_uru_majflt; + + buf->flags |= (_glibtop_sysdeps_proc_kernel_wchan + | _glibtop_sysdeps_proc_kernel_pstats); + +#else + #if !defined(__NetBSD__) || !defined(SACTIVE) buf->nwchan = (unsigned long) pinfo [0].PROC_WCHAN &~ KERNBASE; @@@@ -267,4 +303,6 @@@@ glibtop_get_proc_kernel_p (glibtop *serv */ return; #endif /* __FreeBSD__ */ + +#endif /* NetBSD */ } @ 1.4 log @update to 2.20.0 This switches to the new gnome-2.20 branch. pkgsrc notes: -System dependant parts were reorganized upstream, in particular there if a subtree for FreeBSD now, and one for the other BSDs. I didn't pull in the DragonFly patches because I can't decide whether to base them on the freebsd or the rest. -I've changed the NetBSD code to use kinfo_proc2 almost completely. Some vm statistics reporting might be less accurate now because some fields in proc2 seem to be unmaintained by the current kernel (eg ixrss). -Also, some libgtop functions might be able to run in the non-privileged part now, but dealing with this would require even more #ifdefs, so we should consider setting up a private subtree as FreeBSD did. -I didn't verify with older NetBSDs; kvm_getproc2() has been in the tree for quite some time so I hope it will just work without the need for excessive "#if __NetBSD_Version__ > t". @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- sysdeps/bsd/prockernel.c.orig 2007-04-27 00:27:34.000000000 +0200 d5 9 @ 1.3 log @Rename libgtop2 to libgtop, to match upstream name. @ text @d1 1 a1 1 $NetBSD: patch-ai,v 1.1 2006/02/28 23:48:12 joerg Exp $ d3 12 a14 4 --- sysdeps/freebsd/prockernel.c.orig 2004-09-24 22:49:06.000000000 +0000 +++ sysdeps/freebsd/prockernel.c @@@@ -35,7 +35,7 @@@@ #include a15 4 #if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) && \ - !defined(__NetBSD__) + !defined(__NetBSD__) && !defined(__DragonFly__) #include d17 20 d38 14 a51 1 @@@@ -93,7 +93,7 @@@@ glibtop_get_proc_kernel_p (glibtop *serv d54 3 d58 1 a58 2 -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) d62 3 a64 1 @@@@ -126,9 +126,14 @@@@ glibtop_get_proc_kernel_p (glibtop *serv d66 22 a89 4 +#ifdef __DragonFly__ +#define PROC_WCHAN kp_thread.td_wchan +#define PROC_WMESG kp_thread.td_wmesg +#else d91 1 a91 3 #define PROC_WMESG kp_proc.p_wmesg #define PROC_WMESG kp_eproc.e_wmesg +#endif d95 25 a119 9 @@@@ -146,7 +151,7 @@@@ glibtop_get_proc_kernel_p (glibtop *serv } #endif -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) /* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */ @ 1.2 log @Move "libgtop" package to "devel" category. @ text @d1 1 a1 1 $NetBSD: patch-ai,v 1.1 1998/10/07 13:11:35 agc Exp $ d3 31 a33 8 --- sysdeps/bsd/procmem.c 1998/10/07 11:22:59 1.1 +++ sysdeps/bsd/procmem.c 1998/10/07 11:39:30 @@@@ -31,6 +31,9 @@@@ #include #include #include +#ifdef __NetBSD__ +#include d36 5 a40 9 #include #include @@@@ -96,6 +99,9 @@@@ struct vnode vnode; struct inode inode; int count; +#ifdef __NetBSD__ + vn_pager_t vnpage; +#endif d42 2 a43 16 glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MEM), 0); @@@@ -150,8 +156,16 @@@@ &entry, sizeof (entry)) != sizeof (entry)) glibtop_error_io_r (server, "kvm_read (entry)"); +#ifdef __FreeBSD__ if (entry.eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) continue; +#elseif defined(UVM) + if (entry.eflags & (MAP_ENTRY_IS_A_MAP|MAP_ENTRY_IS_SUB_MAP)) + continue; +#else + if (entry.is_a_map || entry.is_sub_map) + continue; +#endif d45 1 a45 19 if (!entry.object.vm_object) continue; @@@@ -165,10 +179,17 @@@@ /* If the object is of type vnode, add its size */ +#ifdef __FreeBSD__ if (object.type != OBJT_VNODE) continue; - buf->share += object.un_pager.vnp.vnp_size; +#else + if (object.pager->pg_type != PG_VNODE) + continue; + vnpage = (vn_pager_t) object.pager->pg_handle; + buf->share += vnpage->vnp_size; +#endif + } a46 1 glibtop_suid_leave (server); @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @Initial import of libgtop-0.26 into the Packages Collection. This is part of the GNOME project, and is used to retrieve system information, such as CPU usage etc. This is not yet complete, but is functional to the point where the whole thing compiles and installs. Someone else can pick this up and run with it now. @ text @@