From 854e0b37fb1753222816c13f443814347d4f748e Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 14 Jul 2011 19:09:48 +0000 Subject: [PATCH] MFC 223841: Always skip the kernel idle process if requested, it is not specific to the 'CPU' mode. git-svn-id: svn://svn.freebsd.org/base/stable/8@224035 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.bin/top/machine.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 4c5568249..4083ba0de 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; -- 2.45.0