intrcnt: Fix long standing interrupt name/count array mismatch
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 10 Apr 2011 11:18:17 +0000 (19:18 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 10 Apr 2011 11:30:26 +0000 (19:30 +0800)
commit3242c748ea74256b58d8ef0f7a7783b8473847c3
tree9fa8c1abcc552122b1f8fa8ad3a284839e8fdf84
parent44d294a0bf6e8980104757412fc2301137538ac6
intrcnt: Fix long standing interrupt name/count array mismatch

hw.intrnames always returns all interrupts' name, while hw.intrcnt
only returns count of interrupts that get installed.  This
mismatching cause utilities like vmstat(8) to report wrong interrupt
counts.

Keep the old symantic of hw.intrcnt and add hw.intrcnt_all, which
returns count of all interrupts.  Let vmstat(8) and systat(1) use
hw.intrcnt_all.
sys/kern/kern_intr.c
usr.bin/systat/vmstat.c
usr.bin/vmstat/vmstat.c