diff options
author | jhb <jhb@FreeBSD.org> | 2011-07-07 13:37:46 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-07-07 13:37:46 +0000 |
commit | 57066eeffc3809b850ac3e912cf5303585f7180e (patch) | |
tree | b0bd87ab4fa77509829881b3a718c0936ed47242 /usr.bin | |
parent | 4c826593398062e930362d48dffc0c3798d88b0f (diff) | |
download | FreeBSD-src-57066eeffc3809b850ac3e912cf5303585f7180e.zip FreeBSD-src-57066eeffc3809b850ac3e912cf5303585f7180e.tar.gz |
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
Diffstat (limited to 'usr.bin')
-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 4c55682..4083ba0 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; |