svn commit: r337448 - head/usr.bin/top
Eitan Adler
eadler at FreeBSD.org
Wed Aug 8 06:31:47 UTC 2018
Author: eadler
Date: Wed Aug 8 06:31:46 2018
New Revision: 337448
URL: https://svnweb.freebsd.org/changeset/base/337448
Log:
top(1): hide THR column in separate-thread mode.
It does not make sense to show a "thread count" column when displaying
threads separately. In fact we don't, but do show the header for this
column. Fix this.
Modified:
head/usr.bin/top/machine.c
Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c Wed Aug 8 04:46:03 2018 (r337447)
+++ head/usr.bin/top/machine.c Wed Aug 8 06:31:46 2018 (r337448)
@@ -388,7 +388,10 @@ format_header(const char *uname_field)
sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0,
ps.jail ? " JID" : "");
sbuf_printf(header, " %-*.*s ", namelength, namelength, uname_field);
- sbuf_cat(header, "THR PRI NICE SIZE RES ");
+ if (!ps.thread) {
+ sbuf_cat(header, "THR ");
+ }
+ sbuf_cat(header, "PRI NICE SIZE RES ");
if (ps.swap) {
sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP");
}
More information about the svn-src-head
mailing list