svn commit: r223841 - head/usr.bin/top
John Baldwin
jhb at FreeBSD.org
Thu Jul 7 13:37:47 UTC 2011
Author: jhb
Date: Thu Jul 7 13:37:46 2011
New Revision: 223841
URL: http://svn.freebsd.org/changeset/base/223841
Log:
Always skip the kernel idle process if requested, it is not specific to
the 'CPU' mode.
PR: bin/158677
Reported by: arundel
MFC after: 3 days
Modified:
head/usr.bin/top/machine.c
Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c Thu Jul 7 11:59:51 2011 (r223840)
+++ head/usr.bin/top/machine.c Thu Jul 7 13:37:46 2011 (r223841)
@@ -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;
More information about the svn-src-head
mailing list