Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Oops, only register those event counter...
details: https://anonhg.NetBSD.org/src/rev/6fca1d443add
branches: trunk
changeset: 512701:6fca1d443add
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Jul 14 05:48:45 2001 +0000
description:
Oops, only register those event counters if the primary processor.
diffstat:
sys/arch/alpha/alpha/trap.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (43 lines):
diff -r 16161a955fe3 -r 6fca1d443add sys/arch/alpha/alpha/trap.c
--- a/sys/arch/alpha/alpha/trap.c Sat Jul 14 05:10:38 2001 +0000
+++ b/sys/arch/alpha/alpha/trap.c Sat Jul 14 05:48:45 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.75 2001/07/14 05:10:38 thorpej Exp $ */
+/* $NetBSD: trap.c,v 1.76 2001/07/14 05:48:45 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.75 2001/07/14 05:10:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.76 2001/07/14 05:48:45 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -114,6 +114,7 @@
#include <machine/cpu.h>
#include <machine/reg.h>
#include <machine/alpha.h>
+#include <machine/rpb.h>
#ifdef DDB
#include <machine/db_machdep.h>
#endif
@@ -154,10 +155,12 @@
* If this is the primary processor, initialize some trap
* event counters.
*/
- evcnt_attach_dynamic(&fpevent_use, EVCNT_TYPE_MISC, NULL,
- "FP", "proc use");
- evcnt_attach_dynamic(&fpevent_reuse, EVCNT_TYPE_MISC, NULL,
- "FP", "proc re-use");
+ if (cpu_number() == hwrpb->rpb_primary_cpu_id) {
+ evcnt_attach_dynamic(&fpevent_use, EVCNT_TYPE_MISC, NULL,
+ "FP", "proc use");
+ evcnt_attach_dynamic(&fpevent_reuse, EVCNT_TYPE_MISC, NULL,
+ "FP", "proc re-use");
+ }
}
static void
Home |
Main Index |
Thread Index |
Old Index