diff options
Diffstat (limited to 'runtime/perf.h')
-rw-r--r-- | runtime/perf.h | 23 |
1 files changed, 14 insertions, 9 deletions
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_ */ |