Index: head/sysutils/xosview/files/patch-kernel.cc =================================================================== --- head/sysutils/xosview/files/patch-kernel.cc (revision 46658) +++ head/sysutils/xosview/files/patch-kernel.cc (revision 46659) @@ -1,76 +1,76 @@ --- bsd/kernel.cc.orig Mon Jul 17 11:52:31 2000 +++ bsd/kernel.cc Tue Aug 21 12:23:41 2001 @@ -46,6 +46,7 @@ #endif #ifdef HAVE_DEVSTAT +#include #include #include /* For malloc(). */ void DevStat_Init(); @@ -297,7 +298,12 @@ while (nlp && nlp->n_name) { if ((nlp->n_type == 0) || (nlp->n_value == 0)) /*errx (-1, "kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name);*/ +#if defined(XOSVIEW_FREEBSD) && defined(__alpha__) + /* XXX: this should be properly fixed. */ + ; +#else warnx ("kvm_nlist() lookup failed for symbol '%s'.", nlp->n_name); +#endif nlp++; } #ifdef HAVE_DEVSTAT @@ -493,7 +499,7 @@ // void -BSDGetSwapCtlInfo(int *totalp, int *freep) { -+BSDGetSwapCtlInfo(long *totalp, long *freep) { ++BSDGetSwapCtlInfo(int64_t *totalp, int64_t *freep) { int totalinuse, totalsize; int rnswap, nswap = swapctl(SWAP_NSWAP, 0, 0); struct swapent *swapiter; @@ -828,25 +834,25 @@ OpenKDIfNeeded(); nintr = (nlst[EINTRCNT_SYM_INDEX].n_value - nlst[INTRCNT_SYM_INDEX].n_value) / sizeof(int); -#ifdef XOSVIEW_FREEBSD - /* I'm not sure exactly how FreeBSD does things, but just do +#if defined(i386) +# if defined(XOSVIEW_FREEBSD) + /* I'm not sure exactly how FreeBSD/i386 does things, but just do * 16 for now. bgrayson */ return 16; -#else -# if defined(i386) +# else /* On the 386 platform, we count stray interrupts between * intrct and eintrcnt, also, but we don't want to show these. */ return nintr/2; -# else - return nintr; # endif +#else + return nintr; #endif } #endif /* XOSVIEW_OPENBSD */ void BSDGetIntrStats (unsigned long intrCount[NUM_INTR]) { -#ifdef XOSVIEW_FREEBSD +#if defined(XOSVIEW_FREEBSD) && defined(__i386__) /* FreeBSD has an array of interrupt counts, indexed by device number. These are also indirected by IRQ num with intr_countp: */ safe_kvm_read (nlst[INTRCOUNTP_SYM_INDEX].n_value, @@ -875,8 +881,8 @@ intrCount[i] = kvm_intrptrs[i]; #endif /* _BSDI_VERSION */ -#else /* XOSVIEW_FREEBSD */ - // NetBSD/OpenBSD version, based on vmstat.c. Note that the pc532 +#else /* XOSVIEW_FREEBSD & i386 */ + // NetBSD/OpenBSD & FreeBSD/Alpha version, based on vmstat.c. Note that the pc532 // platform does support intrcnt and eintrcnt, but vmstat uses // the more advanced event counters to provide software // counts. We'll just use the intrcnt array here. If anyone Property changes on: head/sysutils/xosview/files/patch-kernel.cc ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/sysutils/xosview/files/patch-kernel.h =================================================================== --- head/sysutils/xosview/files/patch-kernel.h (revision 46658) +++ head/sysutils/xosview/files/patch-kernel.h (revision 46659) @@ -1,24 +1,24 @@ --- bsd/kernel.h.orig Fri May 29 14:21:36 1998 +++ bsd/kernel.h Tue Aug 21 10:50:17 2001 @@ -52,7 +52,7 @@ #ifdef HAVE_SWAPCTL void -BSDGetSwapCtlInfo(int* total, int* free); -+BSDGetSwapCtlInfo(long* total, long* free); ++BSDGetSwapCtlInfo(int64_t* total, int64_t* free); #endif int @@ -67,7 +67,11 @@ #endif -#define NUM_INTR 16 +#if defined(XOSVIEW_FREEBSD) && defined(__alpha__) +# define NUM_INTR 256 +#else +# define NUM_INTR 16 +#endif int BSDIntrInit(); Property changes on: head/sysutils/xosview/files/patch-kernel.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/xosview/files/patch-swapinternal.cc =================================================================== --- head/sysutils/xosview/files/patch-swapinternal.cc (revision 46658) +++ head/sysutils/xosview/files/patch-swapinternal.cc (revision 46659) @@ -1,24 +1,24 @@ --- bsd/swapinternal.cc.orig Tue Nov 16 23:16:20 1999 +++ bsd/swapinternal.cc Tue Aug 21 11:27:26 2001 @@ -437,16 +437,17 @@ #endif /* XOSVIEW_FREEBSD */ void -BSDGetSwapInfo(int* total, int* free) -+BSDGetSwapInfo(long* total, long* free) ++BSDGetSwapInfo(int64_t* total, int64_t* free) { - int i, avail, npfree, used=0, xsize, xfree; + int i, npfree, xsize, xfree; -+ long avail, used=0; ++ int64_t avail, used=0; fetchswap(); #ifdef USE_KVM_GETSWAPINFO avail = used = 0; if (kvnsw == 0) { - avail += pagesize * kvmsw[0].ksw_total; - used += pagesize * kvmsw[0].ksw_used; -+ avail += pagesize * (long)kvmsw[0].ksw_total; -+ used += pagesize * (long)kvmsw[0].ksw_used; ++ avail += pagesize * (int64_t)kvmsw[0].ksw_total; ++ used += pagesize * (int64_t)kvmsw[0].ksw_used; } *total = avail; *free = avail - used; Property changes on: head/sysutils/xosview/files/patch-swapinternal.cc ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/xosview/files/patch-swapinternal.h =================================================================== --- head/sysutils/xosview/files/patch-swapinternal.h (revision 46658) +++ head/sysutils/xosview/files/patch-swapinternal.h (revision 46659) @@ -1,12 +1,12 @@ --- bsd/swapinternal.h.orig Wed Feb 11 21:04:07 1998 +++ bsd/swapinternal.h Tue Aug 21 10:51:00 2001 @@ -12,7 +12,7 @@ BSDInitSwapInfo(); void -BSDGetSwapInfo(int* total, int* free); -+BSDGetSwapInfo(long* total, long* free); ++BSDGetSwapInfo(int64_t* total, int64_t* free); void -BSDGetSwapCtlInfo(int* total, int* free); -+BSDGetSwapCtlInfo(long* total, long* free); ++BSDGetSwapCtlInfo(int64_t* total, int64_t* free); Property changes on: head/sysutils/xosview/files/patch-swapinternal.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/xosview/files/patch-swapmeter.cc =================================================================== --- head/sysutils/xosview/files/patch-swapmeter.cc (revision 46658) +++ head/sysutils/xosview/files/patch-swapmeter.cc (revision 46659) @@ -1,7 +1,7 @@ --- bsd/swapmeter.cc.orig Tue Aug 21 10:52:35 2001 +++ bsd/swapmeter.cc Tue Aug 21 10:53:02 2001 @@ -76,3 +76,3 @@ void SwapMeter::getswapinfo( void ){ - int total_int, free_int; -+ long total_int, free_int; ++ int64_t total_int, free_int; Property changes on: head/sysutils/xosview/files/patch-swapmeter.cc ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property