diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 89e14df..ab78a0c 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -90,10 +90,6 @@ struct handle #define LP(pp, field) ((pp)->kp_lwp.kl_ ## field) #define VP(pp, field) ((pp)->kp_vm_ ## field) -/* define what weighted cpu is. */ -#define weighted_cpu(pct, pp) (PP((pp), swtime) == 0 ? 0.0 : \ - ((pct) / (1.0 - exp(PP((pp), swtime) * logcpu)))) - /* what we consider to be process size: */ #define PROCSIZE(pp) (VP((pp), map_size) / 1024) @@ -102,16 +98,16 @@ struct handle */ static char smp_header[] = - " PID %-*.*s PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND"; + " PID %-*.*s PRI NICE SIZE RES STATE C TIME CPU COMMAND"; #define smp_Proc_format \ - "%5d %-*.*s %3d %3d%7s %6s %-6.6s %1x%7s %5.2f%% %5.2f%% %.*s" + "%5d %-*.*s %3d %3d%7s %6s %-6.6s %1x%7s %5.2f%% %.*s" static char up_header[] = - " PID %-*.*s PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND"; + " PID %-*.*s PRI NICE SIZE RES STATE TIME CPU COMMAND"; #define up_Proc_format \ - "%5d %-*.*s %3d %3d%7s %6s %-6.6s%.0d%7s %5.2f%% %5.2f%% %.*s" + "%5d %-*.*s %3d %3d%7s %6s %-6.6s%.0d%7s %5.2f%% %.*s" @@ -266,9 +262,6 @@ machine_init(struct statics *statics) return(-1); } - /* this is used in calculating WCPU -- calculate it ahead of time */ - logcpu = log(loaddouble(ccpu)); - pbase = NULL; pref = NULL; nproc = 0; @@ -646,7 +639,6 @@ format_next_process(caddr_t xhandle, char *(*get_userid)(long)) status, (int)(smpmode ? LP(pp, cpuid) : 0), format_time(cputime), - 100.0 * weighted_cpu(pct, pp), 100.0 * pct, cmdlength, printable(PP(pp, comm)));