(possible) mis-merge of per-cpu stats to 6.x

From: pluknet <pluknet_at_gmail.com>
Date: Tue, 21 Oct 2008 19:02:24 +0400
Hi!

It seems that after John's partial backup to restore 6.x ABI
read_cpu_time() became useless.
It's no more called from sysctl_kern_cp_time().

wbr,
pluknet

--- kern_clock.c.orig   Tue Oct 21 18:56:09 2008
+++ kern_clock.c        Tue Oct 21 18:57:12 2008
_at__at_ -91,9 +91,7 _at__at_ sysctl_kern_cp_time(SYSCTL_HANDLER_ARGS)
 #ifdef SCTL_MASK32
        int i;
        unsigned int cp_time32[CPUSTATES];
-#endif

-#ifdef SCTL_MASK32
        if (req->flags & SCTL_MASK32) {
                if (!req->oldptr)
                        return SYSCTL_OUT(req, 0, sizeof(cp_time32));
_at__at_ -156,23 +154,6 _at__at_ sysctl_kern_cp_times(SYSCTL_HANDLER_ARGS

 SYSCTL_PROC(_kern, OID_AUTO, cp_times, CTLTYPE_LONG|CTLFLAG_RD,
     0,0, sysctl_kern_cp_times, "LU", "per-CPU time statistics");
-
-void
-read_cpu_time(long *cp_time)
-{
-       struct pcpu *pc;
-       int i, j;
-
-       /* Sum up global cp_time[]. */
-       bzero(cp_time, sizeof(long) * CPUSTATES);
-       for (i = 0; i <= mp_maxid; i++) {
-               if (CPU_ABSENT(i))
-                       continue;
-               pc = pcpu_find(i);
-               for (j = 0; j < CPUSTATES; j++)
-                       cp_time[j] += pc->pc_cp_time[j];
-       }
-}

 #ifdef SW_WATCHDOG
 #include <sys/watchdog.h>
EOF
Received on Tue Oct 21 2008 - 13:02:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:36 UTC