From 56599746fbb2685925432511ead6fb1e379206e2 Mon Sep 17 00:00:00 2001 From: Will Cohen Date: Wed, 17 Feb 2010 11:28:36 -0500 Subject: Modify the systemtap perf sampling internal api The only information available in the overflow interrupt is the event. Need to group other pieces of information needed by systemtap, so they can be found based on the the location of the event information. --- runtime/perf.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'runtime/perf.h') diff --git a/runtime/perf.h b/runtime/perf.h index 32383665..19f89fe7 100644 --- a/runtime/perf.h +++ b/runtime/perf.h @@ -16,17 +16,22 @@ * @brief Header file for performance monitoring hardware support */ -struct _Perf { - /* per-cpu data. allocated with _stp_alloc_percpu() */ - struct perf_event **pd; - perf_overflow_handler_t callback; -}; +typedef struct { + struct perf_event *event; + const char *pp; + void (*ph) (struct context *); +} perfcpu; -typedef struct _Perf *Perf; +typedef struct { + /* per-cpu data. allocated with _stp_alloc_percpu() */ + perfcpu *pd; +} Perf; -static Perf _stp_perf_init (struct perf_event_attr *attr, - perf_overflow_handler_t callback); +static Perf *_stp_perf_init (struct perf_event_attr *attr, + perf_overflow_handler_t callback, + const char *pp, + void (*ph) (struct context *) ); -static void _stp_perf_del (Perf pe); +static void _stp_perf_del (Perf *pe); #endif /* _PERF_H_ */ -- cgit