00001 /** 00002 * @file op_alloc_counter.h 00003 * hardware counter allocation 00004 * 00005 * You can have silliness here. 00006 * 00007 * @remark Copyright 2002 OProfile authors 00008 * @remark Read the file COPYING 00009 * 00010 * @author John Levon 00011 * @author Philippe Elie 00012 */ 00013 00014 #ifndef OP_ALLOC_COUNTER_H 00015 #define OP_ALLOC_COUNTER_H 00016 00017 #include <stddef.h> 00018 00019 #include "op_cpu_type.h" 00020 00021 struct op_event; 00022 00023 #ifdef __cplusplus 00024 extern "C" { 00025 #endif 00026 00027 /** 00028 * @param pev array of selected event we want to bind to counter 00029 * @param nr_events size of pev array 00030 * @param cpu_type cpu type 00031 * 00032 * Try to calculate a binding between passed event in pev and counter number. 00033 * The binding is returned in a size_t * where returned ptr[i] is the counter 00034 * number bound to pev[i] 00035 */ 00036 size_t * map_event_to_counter(struct op_event const * pev[], int nr_events, 00037 op_cpu cpu_type); 00038 00039 #ifdef __cplusplus 00040 } 00041 #endif 00042 00043 #endif /* !OP_ALLOC_COUNTER_H */
1.6.1