diff options
author | dfr <dfr@FreeBSD.org> | 1999-01-10 12:35:39 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-01-10 12:35:39 +0000 |
commit | 32d5c8b4c0a33630ad2883222e933432bcdf52c6 (patch) | |
tree | 2d04ed5f95fb3c489abb1801641e91863ec78ff5 /sys | |
parent | 88ae26fef69887203a871fca927f456a66c2cad4 (diff) | |
download | FreeBSD-src-32d5c8b4c0a33630ad2883222e933432bcdf52c6.zip FreeBSD-src-32d5c8b4c0a33630ad2883222e933432bcdf52c6.tar.gz |
Add hooks for the Iprobe kernel profiler.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/interrupt.c | 13 | ||||
-rw-r--r-- | sys/alpha/alpha/pal.s | 21 | ||||
-rw-r--r-- | sys/alpha/include/alpha_cpu.h | 3 |
3 files changed, 34 insertions, 3 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index 04d945c..6010e74 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -1,4 +1,4 @@ -/* $Id: interrupt.c,v 1.7 1998/11/18 23:51:40 dfr Exp $ */ +/* $Id: interrupt.c,v 1.8 1998/11/28 09:55:15 dfr Exp $ */ /* $NetBSD: interrupt.c,v 1.23 1998/02/24 07:38:01 thorpej Exp $ */ /* @@ -59,6 +59,15 @@ struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */ volatile int mc_expected, mc_received; +static void +dummy_perf(unsigned long vector, struct trapframe *framep) +{ + printf("performance interrupt!\n"); +} + +void (*perf_irq)(unsigned long, struct trapframe *) = dummy_perf; + + void interrupt(a0, a1, a2, framep) unsigned long a0, a1, a2; @@ -106,7 +115,7 @@ interrupt(a0, a1, a2, framep) break; case ALPHA_INTR_PERF: /* interprocessor interrupt */ - printf("performance interrupt!\n"); + perf_irq(a1, framep); break; case ALPHA_INTR_PASSIVE: diff --git a/sys/alpha/alpha/pal.s b/sys/alpha/alpha/pal.s index 36ecdfb..3d179a5 100644 --- a/sys/alpha/alpha/pal.s +++ b/sys/alpha/alpha/pal.s @@ -348,3 +348,24 @@ LEAF(alpha_pal_swpctx,1) call_pal PAL_OSF1_swpctx RET END(alpha_pal_swpctx) + + +/* + * alpha_pal_wrperfmon: Write perf monitor [PRIVILEGED] + * + * Enables / disables performance monitoring hardware + * + * Arguments: + * a0 function type + * + * a1 function parameter + * + * Returns: + * v0 0 (failure) or 1 (success) + */ +LEAF(alpha_pal_wrperfmon,2) + call_pal PAL_OSF1_wrperfmon + RET + END(alpha_pal_wrperfmon) + + diff --git a/sys/alpha/include/alpha_cpu.h b/sys/alpha/include/alpha_cpu.h index 4bd1050..80eb307 100644 --- a/sys/alpha/include/alpha_cpu.h +++ b/sys/alpha/include/alpha_cpu.h @@ -1,4 +1,4 @@ -/* $Id: alpha_cpu.h,v 1.3 1998/06/14 13:45:10 dfr Exp $ */ +/* $Id: alpha_cpu.h,v 1.4 1998/12/23 11:50:50 dfr Exp $ */ /* From: NetBSD: alpha_cpu.h,v 1.15 1997/09/20 19:02:34 mjacob Exp */ /* @@ -326,5 +326,6 @@ void alpha_pal_wrusp __P((unsigned long)); void alpha_pal_wrvptptr __P((unsigned long)); void alpha_pal_wrmces __P((unsigned long)); void alpha_pal_wrval __P((unsigned long)); +unsigned long alpha_pal_wrperfmon __P((unsigned long, unsigned long)); #endif /* __ALPHA_ALPHA_CPU_H__ */ |