From owner-cvs-all@FreeBSD.ORG Sun Apr 17 11:03:34 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B229B16A4D1 for ; Sun, 17 Apr 2005 11:03:34 +0000 (GMT) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9237743D55 for ; Sun, 17 Apr 2005 11:03:31 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 4682 invoked by uid 207); 17 Apr 2005 11:03:29 -0000 Received: from keramida@ceid.upatras.gr by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.135):. Processed in 1.682633 secs); 17 Apr 2005 11:03:29 -0000 Received: from dialup135.ach.sch.gr (HELO gothmog.gr) ([81.186.70.135]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 17 Apr 2005 11:03:27 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j3HB3NiS083380; Sun, 17 Apr 2005 14:03:23 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j3HB3LPX083371; Sun, 17 Apr 2005 14:03:21 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 17 Apr 2005 14:03:21 +0300 From: Giorgos Keramidas To: Dag-Erling Sm?rgrav Message-ID: <20050417110321.GA78636@gothmog.gr> References: <200504161543.j3GFhclO075103@repoman.freebsd.org> <86acnyd2k7.fsf@xps.des.no> <20050416191436.G68941@fledge.watson.org> <863btq4k9m.fsf@xps.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <863btq4k9m.fsf@xps.des.no> cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Robert Watson cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/top machine.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Apr 2005 11:03:34 -0000 On 2005-04-16 21:03, Dag-Erling Sm?rgrav wrote: >Robert Watson writes: >> The 'C' column is quite useful when tuning SMP systems, and something >> I frequently look at when debugging performance issues in 5.x and >> 6.x. > > The C column is pointless when you're not showing individual threads, > since different threads in the same process might be running > simultaneously on different CPUs. That's probably I could manage to do later today or tomorrow. For the moment, how does the following change look (change of NICE to NIC and removal of CPU column)? For those whose mailers may mess whitespace, the diff is also available online at: http://people.freebsd.org/~keramida/diff/top.nic+wpcu.diff %%% Index: machine.c =================================================================== RCS file: /home/ncvs/src/usr.bin/top/machine.c,v retrieving revision 1.71 diff -u -r1.71 machine.c --- machine.c 16 Apr 2005 15:43:38 -0000 1.71 +++ machine.c 17 Apr 2005 10:55:36 -0000 @@ -103,20 +103,20 @@ "%5d %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s" static char smp_header_thr[] = - " PID %-*.*s THR PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND"; + " PID %-*.*s THR PRI NIC SIZE RES STATE C TIME WCPU COMMAND"; static char smp_header[] = - " PID %-*.*s " "PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND"; + " PID %-*.*s " "PRI NIC SIZE RES STATE C TIME WCPU COMMAND"; #define smp_Proc_format \ - "%5d %-*.*s %s%3d %4d%7s %6s %-6.6s %1x%7s %5.2f%% %5.2f%% %.*s" + "%5d %-*.*s %s%3d %3d%7s %6s %-6.6s %1x%7s %5.2f%% %.*s" static char up_header_thr[] = - " PID %-*.*s THR PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND"; + " PID %-*.*s THR PRI NIC SIZE RES STATE TIME WCPU COMMAND"; static char up_header[] = - " PID %-*.*s " "PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND"; + " PID %-*.*s " "PRI NIC SIZE RES STATE TIME WCPU COMMAND"; #define up_Proc_format \ - "%5d %-*.*s %s%3d %4d%7s %6s %-6.6s%.0d%7s %5.2f%% %5.2f%% %.*s" + "%5d %-*.*s %s%3d %3d%7s %6s %-6.6s%.0d%7s %5.2f%% %.*s" /* process state names for the "STATE" column of the display */ @@ -781,7 +781,6 @@ smpmode ? pp->ki_lastcpu : 0, format_time(cputime), 100.0 * weighted_cpu(pct, pp), - 100.0 * pct, screen_width > cmdlengthdelta ? screen_width - cmdlengthdelta : 0, %%%