PAPI  5.0.1.0
papi_vector.h
Go to the documentation of this file.
00001 
00004 #ifndef _PAPI_VECTOR_H
00005 #define _PAPI_VECTOR_H
00006 
00009 typedef struct cmp_struct_sizes {
00010     int     context;
00011     int     control_state;
00012     int     reg_value;
00013     int     reg_alloc;
00014 } cmp_struct_sizes_t;
00015 
00018 typedef struct papi_vectors {
00020     PAPI_component_info_t   cmp_info;
00021 
00023     cmp_struct_sizes_t size;
00024 
00025 /* List of exposed function pointers for this component */
00026     void ( *dispatch_timer ) ( int, hwd_siginfo_t *, void * );
00027     void *  (*get_overflow_address) (int, char *, int);                     
00028     int     (*start)        (hwd_context_t *, hwd_control_state_t *);       
00029     int     (*stop)         (hwd_context_t *, hwd_control_state_t *);       
00030     int     (*read)         (hwd_context_t *, hwd_control_state_t *, long long **, int);    
00031     int     (*reset)        (hwd_context_t *, hwd_control_state_t *);       
00032     int     (*write)        (hwd_context_t *, hwd_control_state_t *, long long[]);          
00033     int         (*cleanup_eventset) ( hwd_control_state_t * );              
00034     int     (*stop_profiling)   (ThreadInfo_t *, EventSetInfo_t *);         
00035     int     (*init_component)   (int);                                      
00036     int     (*init_thread)       (hwd_context_t *);                             
00037     int     (*init_control_state)   (hwd_control_state_t * ptr);            
00038     int     (*update_control_state) (hwd_control_state_t *, NativeInfo_t *, int, hwd_context_t *);  
00039     int     (*ctl)          (hwd_context_t *, int , _papi_int_option_t *);  
00040     int     (*set_overflow)     (EventSetInfo_t *, int, int);               
00041     int     (*set_profile)      (EventSetInfo_t *, int, int);               
00042     int     (*set_domain)       (hwd_control_state_t *, int);               
00043     int     (*ntv_enum_events)  (unsigned int *, int);                      
00044     int     (*ntv_name_to_code) (char *, unsigned int *);                   
00045     int     (*ntv_code_to_name) (unsigned int, char *, int);                
00046     int     (*ntv_code_to_descr)    (unsigned int, char *, int);            
00047     int     (*ntv_code_to_bits) (unsigned int, hwd_register_t *);           
00048     int         (*ntv_code_to_info)     (unsigned int, PAPI_event_info_t *);
00049     int     (*allocate_registers)   (EventSetInfo_t *);
00053     int     (*shutdown_thread)  (hwd_context_t *);                              
00054     int     (*shutdown_component)   (void);                                 
00055     int     (*user)         (int, void *, void *);                          
00056 }papi_vector_t;
00057 
00058 extern papi_vector_t *_papi_hwd[];
00059 
00060 typedef struct papi_os_vectors {
00061   long long   (*get_real_cycles)      (void);                   
00062   long long   (*get_virt_cycles)      (void);                   
00063   long long   (*get_real_usec)        (void);                   
00064   long long   (*get_virt_usec)        (void);                   
00065   long long   (*get_real_nsec)        (void);                   
00066   long long   (*get_virt_nsec)        (void);                   
00067   int         (*update_shlib_info)    (papi_mdi_t * mdi);       
00068   int         (*get_system_info)      (papi_mdi_t * mdi);       
00069   int         (*get_memory_info)      (PAPI_hw_info_t *, int);  
00070   int         (*get_dmem_info)        (PAPI_dmem_info_t *);     
00071 } papi_os_vector_t;
00072 
00073 extern papi_os_vector_t _papi_os_vector;
00074 
00075 
00076 /* Prototypes */
00077 int _papi_hwi_innoculate_vector( papi_vector_t * v );
00078 int _papi_hwi_innoculate_os_vector( papi_os_vector_t * v );
00079 
00080 #endif /* _PAPI_VECTOR_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines