Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2011 19:09:49 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r224035 - stable/8/usr.bin/top
Message-ID:  <201107141909.p6EJ9nqP042185@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Jul 14 19:09:48 2011
New Revision: 224035
URL: http://svn.freebsd.org/changeset/base/224035

Log:
  MFC 223841:
  Always skip the kernel idle process if requested, it is not specific to
  the 'CPU' mode.

Modified:
  stable/8/usr.bin/top/machine.c
Directory Properties:
  stable/8/usr.bin/top/   (props changed)

Modified: stable/8/usr.bin/top/machine.c
==============================================================================
--- stable/8/usr.bin/top/machine.c	Thu Jul 14 19:05:48 2011	(r224034)
+++ stable/8/usr.bin/top/machine.c	Thu Jul 14 19:09:48 2011	(r224035)
@@ -701,17 +701,16 @@ get_process_info(struct system_info *si,
 			/* skip zombies */
 			continue;
 
+		if (!show_kidle && pp->ki_tdflags & TDF_IDLETD)
+			/* skip kernel idle process */
+			continue;
+		    
 		if (displaymode == DISP_CPU && !show_idle &&
 		    (pp->ki_pctcpu == 0 ||
 		     pp->ki_stat == SSTOP || pp->ki_stat == SIDL))
 			/* skip idle or non-running processes */
 			continue;
 
-		if (displaymode == DISP_CPU && !show_kidle &&
-		    pp->ki_tdflags & TDF_IDLETD)
-			/* skip kernel idle process */
-			continue;
-		    
 		if (displaymode == DISP_IO && !show_idle && p_io == 0)
 			/* skip processes that aren't doing I/O */
 			continue;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107141909.p6EJ9nqP042185>