diff options
author | 2018-05-14 12:31:21 +0000 | |
---|---|---|
committer | 2018-05-14 12:31:21 +0000 | |
commit | 531d8034253fb82282f0f353c086e9ad827e031c (patch) | |
tree | 2ff6558583b14dbec8a9390a12118fb3a9bb8b6e /usr.bin/systat/vmstat.c | |
parent | Remove duplicated word ("scope scope"). (diff) | |
download | wireguard-openbsd-531d8034253fb82282f0f353c086e9ad827e031c.tar.xz wireguard-openbsd-531d8034253fb82282f0f353c086e9ad827e031c.zip |
Stopping counting and reporting CPU time spent spinning on a lock as
system time.
Introduce a new CP_SPIN "scheduler state" and modify userland tools
to display the % of timer a CPU spents spinning.
Based on a diff from jmatthew@, ok pirofti@, bluhm@, visa@, deraadt@
Diffstat (limited to 'usr.bin/systat/vmstat.c')
-rw-r--r-- | usr.bin/systat/vmstat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index a515b73f958..13feb293b6e 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.83 2018/05/03 07:49:18 otto Exp $ */ +/* $OpenBSD: vmstat.c,v 1.84 2018/05/14 12:31:21 mpi Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- @@ -268,7 +268,7 @@ labelkre(void) mvprintw(GENSTATROW, GENSTATCOL, " Csw Trp Sys Int Sof Flt"); mvprintw(GRAPHROW, GRAPHCOL, - " . %%Int . %%Sys . %%Usr . %%Nic . %%Idle"); + " . %%Int . %%Sys . %%Usr . %%Spn . %%Idle"); mvprintw(PROCSROW, PROCSCOL, "Proc:r d s w"); mvprintw(GRAPHROW + 1, GRAPHCOL, "| | | | | | | | | | |"); @@ -306,8 +306,8 @@ labelkre(void) } while (0) #define MAXFAIL 5 -static char cpuchar[CPUSTATES] = { '|', '=', '>', '-', ' ' }; -static char cpuorder[CPUSTATES] = { CP_INTR, CP_SYS, CP_USER, CP_NICE, CP_IDLE }; +static char cpuchar[] = { '|', '=', '>', '-', ' ' }; +static char cpuorder[] = { CP_INTR, CP_SYS, CP_USER, CP_SPIN, CP_IDLE }; void showkre(void) @@ -367,7 +367,7 @@ showkre(void) psiz = 0; f2 = 0.0; - for (c = 0; c < CPUSTATES; c++) { + for (c = 0; c < nitems(cpuorder); c++) { i = cpuorder[c]; f1 = cputime(i); f2 += f1; |