aboutsummaryrefslogtreecommitdiff
path: root/contrib/top/top.c
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2004-08-16 07:51:22 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2004-08-16 07:51:22 +0000
commit5d320d4b9588135d9856d07698bcc4f2cbe1efbf (patch)
treecbc9309044a7b5209118ee3cc432a8d8729f40e3 /contrib/top/top.c
parent4af27623361335eef9a191f7d3a76047095d0f52 (diff)
downloadsrc-5d320d4b9588135d9856d07698bcc4f2cbe1efbf.tar.gz
src-5d320d4b9588135d9856d07698bcc4f2cbe1efbf.zip
This patch merges the sort fields for both pages, so you can (for
example) view io stats while sorting by process size. Also adds voluntary and involuntary context-switch stats to the io page because there was lots of room. Submitted by: Dan Nelson dnelson at allantgroup.com
Notes
Notes: svn path=/head/; revision=133817
Diffstat (limited to 'contrib/top/top.c')
-rw-r--r--contrib/top/top.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/top/top.c b/contrib/top/top.c
index 7c5d09cd962c..d3e1c5698ab5 100644
--- a/contrib/top/top.c
+++ b/contrib/top/top.c
@@ -95,8 +95,7 @@ char *kill_procs();
char *renice_procs();
#ifdef ORDER
-extern int (*proc_compares[])();
-extern int (*io_compares[])();
+extern int (*compares[])();
#else
extern int proc_compare();
extern int io_compare();
@@ -570,10 +569,7 @@ restart:
get_system_info(&system_info);
#ifdef ORDER
- if (displaymode == DISP_CPU)
- compare = proc_compares[order_index];
- else
- compare = io_compares[order_index];
+ compare = compares[order_index];
#else
if (displaymode == DISP_CPU)
compare = proc_compare;