summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2009-11-28 21:01:15 +0000
committermarcel <marcel@FreeBSD.org>2009-11-28 21:01:15 +0000
commite128830deaf82e06a67d131f2a299f8bd89212bb (patch)
treeb4a56c59cdec8c4e64d97cbccbef0d4de3e264a0 /sys/ia64/include
parent4e780937910bd3d67bb667de4e55969a62ecb079 (diff)
downloadFreeBSD-src-e128830deaf82e06a67d131f2a299f8bd89212bb.zip
FreeBSD-src-e128830deaf82e06a67d131f2a299f8bd89212bb.tar.gz
Eliminate teh use of MAXCPU in static arrays of interrupt counters by
adding statistics counters to the PCPU structure. Export the counters through sysctl by giving each PCPU structure its own sysctl context. While here, fix cnt.v_intr by not just having it count clock interrupts, but every interrupt and add more counters for each interrupt source.
Diffstat (limited to 'sys/ia64/include')
-rw-r--r--sys/ia64/include/pcpu.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/ia64/include/pcpu.h b/sys/ia64/include/pcpu.h
index c63573b..3a258fa 100644
--- a/sys/ia64/include/pcpu.h
+++ b/sys/ia64/include/pcpu.h
@@ -30,8 +30,24 @@
#ifndef _MACHINE_PCPU_H_
#define _MACHINE_PCPU_H_
+#include <sys/sysctl.h>
#include <machine/pcb.h>
+struct pcpu_stats {
+ struct sysctl_ctx_list pcs_sysctl_ctx;
+ struct sysctl_oid *pcs_sysctl_tree;
+
+ u_long pcs_nasts; /* IPI_AST counter. */
+ u_long pcs_nclks; /* Clock interrupt counter. */
+ u_long pcs_nextints; /* ExtINT counter. */
+ u_long pcs_nhighfps; /* IPI_HIGH_FP counter. */
+ u_long pcs_nhwints; /* Hardware int. counter. */
+ u_long pcs_npreempts; /* IPI_PREEMPT counter. */
+ u_long pcs_nrdvs; /* IPI_RENDEZVOUS counter. */
+ u_long pcs_nstops; /* IPI_STOP counter. */
+ u_long pcs_nstrays; /* Stray interrupt counter. */
+};
+
#define PCPU_MD_FIELDS \
struct pcb pc_pcb; /* Used by IPI_STOP */ \
struct pmap *pc_current_pmap; /* active pmap */ \
@@ -39,7 +55,8 @@
uint64_t pc_clock; /* Clock counter. */ \
uint64_t pc_clockadj; /* Clock adjust. */ \
uint32_t pc_awake:1; /* CPU is awake? */ \
- uint32_t pc_acpi_id /* ACPI CPU id. */
+ uint32_t pc_acpi_id; /* ACPI CPU id. */ \
+ struct pcpu_stats pc_stats
#ifdef _KERNEL
OpenPOWER on IntegriCloud