|
Packit |
577717 |
/**
|
|
Packit |
577717 |
* @file papi_vector.h
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
#ifndef _PAPI_VECTOR_H
|
|
Packit |
577717 |
#define _PAPI_VECTOR_H
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/** Sizes of structure private to each component
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
typedef struct cmp_struct_sizes {
|
|
Packit |
577717 |
int context;
|
|
Packit |
577717 |
int control_state;
|
|
Packit |
577717 |
int reg_value;
|
|
Packit |
577717 |
int reg_alloc;
|
|
Packit |
577717 |
} cmp_struct_sizes_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/** Vector Table Stuff
|
|
Packit |
577717 |
* @internal */
|
|
Packit |
577717 |
typedef struct papi_vectors {
|
|
Packit |
577717 |
/** Component specific data structure @see papi.h */
|
|
Packit |
577717 |
PAPI_component_info_t cmp_info;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/** Component specific structure sizes*/
|
|
Packit |
577717 |
cmp_struct_sizes_t size;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* List of exposed function pointers for this component */
|
|
Packit |
577717 |
void ( *dispatch_timer ) ( int, hwd_siginfo_t *, void * );
|
|
Packit |
577717 |
void * (*get_overflow_address) (int, char *, int); /**< */
|
|
Packit |
577717 |
int (*start) (hwd_context_t *, hwd_control_state_t *); /**< */
|
|
Packit |
577717 |
int (*stop) (hwd_context_t *, hwd_control_state_t *); /**< */
|
|
Packit |
577717 |
int (*read) (hwd_context_t *, hwd_control_state_t *, long long **, int); /**< */
|
|
Packit |
577717 |
int (*reset) (hwd_context_t *, hwd_control_state_t *); /**< */
|
|
Packit |
577717 |
int (*write) (hwd_context_t *, hwd_control_state_t *, long long[]); /**< */
|
|
Packit |
577717 |
int (*cleanup_eventset) ( hwd_control_state_t * ); /**< */
|
|
Packit |
577717 |
int (*stop_profiling) (ThreadInfo_t *, EventSetInfo_t *); /**< */
|
|
Packit |
577717 |
int (*init_component) (int); /**< */
|
|
Packit |
577717 |
int (*init_thread) (hwd_context_t *); /**< */
|
|
Packit |
577717 |
int (*init_control_state) (hwd_control_state_t * ptr); /**< */
|
|
Packit |
577717 |
int (*update_control_state) (hwd_control_state_t *, NativeInfo_t *, int, hwd_context_t *); /**< */
|
|
Packit |
577717 |
int (*ctl) (hwd_context_t *, int , _papi_int_option_t *); /**< */
|
|
Packit |
577717 |
int (*set_overflow) (EventSetInfo_t *, int, int); /**< */
|
|
Packit |
577717 |
int (*set_profile) (EventSetInfo_t *, int, int); /**< */
|
|
Packit |
577717 |
int (*set_domain) (hwd_control_state_t *, int); /**< */
|
|
Packit |
577717 |
int (*ntv_enum_events) (unsigned int *, int); /**< */
|
|
Packit |
577717 |
int (*ntv_name_to_code) (const char *, unsigned int *); /**< */
|
|
Packit |
577717 |
int (*ntv_code_to_name) (unsigned int, char *, int); /**< */
|
|
Packit |
577717 |
int (*ntv_code_to_descr) (unsigned int, char *, int); /**< */
|
|
Packit |
577717 |
int (*ntv_code_to_bits) (unsigned int, hwd_register_t *); /**< */
|
|
Packit |
577717 |
int (*ntv_code_to_info) (unsigned int, PAPI_event_info_t *);
|
|
Packit |
577717 |
int (*allocate_registers) (EventSetInfo_t *);
|
|
Packit |
577717 |
/**< called when an event is added. Should make
|
|
Packit |
577717 |
sure the new EventSet can map to hardware and
|
|
Packit |
577717 |
any conflicts are addressed */
|
|
Packit |
577717 |
int (*shutdown_thread) (hwd_context_t *); /**< */
|
|
Packit |
577717 |
int (*shutdown_component) (void); /**< */
|
|
Packit |
577717 |
int (*user) (int, void *, void *); /**< */
|
|
Packit |
577717 |
}papi_vector_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
extern papi_vector_t *_papi_hwd[];
|
|
Packit |
577717 |
|
|
Packit |
577717 |
typedef struct papi_os_vectors {
|
|
Packit |
577717 |
long long (*get_real_cycles) (void); /**< */
|
|
Packit |
577717 |
long long (*get_virt_cycles) (void); /**< */
|
|
Packit |
577717 |
long long (*get_real_usec) (void); /**< */
|
|
Packit |
577717 |
long long (*get_virt_usec) (void); /**< */
|
|
Packit |
577717 |
long long (*get_real_nsec) (void); /**< */
|
|
Packit |
577717 |
long long (*get_virt_nsec) (void); /**< */
|
|
Packit |
577717 |
int (*update_shlib_info) (papi_mdi_t * mdi); /**< */
|
|
Packit |
577717 |
int (*get_system_info) (papi_mdi_t * mdi); /**< */
|
|
Packit |
577717 |
int (*get_memory_info) (PAPI_hw_info_t *, int); /**< */
|
|
Packit |
577717 |
int (*get_dmem_info) (PAPI_dmem_info_t *); /**< */
|
|
Packit |
577717 |
} papi_os_vector_t;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
extern papi_os_vector_t _papi_os_vector;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Prototypes */
|
|
Packit |
577717 |
int _papi_hwi_innoculate_vector( papi_vector_t * v );
|
|
Packit |
577717 |
int _papi_hwi_innoculate_os_vector( papi_os_vector_t * v );
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#endif /* _PAPI_VECTOR_H */
|