diff options
author | John Baldwin <jhb@FreeBSD.org> | 2011-07-07 13:37:46 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2011-07-07 13:37:46 +0000 |
commit | 034b7b80b219976f2ebfeb4197ef7e6d214e48e3 (patch) | |
tree | b0bd87ab4fa77509829881b3a718c0936ed47242 /usr.bin/top/machine.c | |
parent | 4659e09dcb84c6f9e487e8a872e79e96a6ab5803 (diff) | |
download | src-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.c | 9 |
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; |