aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/top/machine.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2011-07-07 13:37:46 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2011-07-07 13:37:46 +0000
commit034b7b80b219976f2ebfeb4197ef7e6d214e48e3 (patch)
treeb0bd87ab4fa77509829881b3a718c0936ed47242 /usr.bin/top/machine.c
parent4659e09dcb84c6f9e487e8a872e79e96a6ab5803 (diff)
downloadsrc-034b7b80b219976f2ebfeb4197ef7e6d214e48e3.tar.gz
src-034b7b80b219976f2ebfeb4197ef7e6d214e48e3.zip
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
Notes
Notes: svn path=/head/; revision=223841
Diffstat (limited to 'usr.bin/top/machine.c')
-rw-r--r--usr.bin/top/machine.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 4c5568249d40..4083ba0dea08 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -701,17 +701,16 @@ get_process_info(struct system_info *si, struct process_select *sel,
/* 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;