PAPI  5.0.1.0
sw_multiplex.h
Go to the documentation of this file.
00001 #ifndef MULTIPLEX_H
00002 #define MULTIPLEX_H
00003 
00004 #define PAPI_MAX_SW_MPX_EVENTS 32
00005 
00006 /* Structure contained in the EventSet structure that 
00007    holds information about multiplexing. */
00008 
00009 typedef enum
00010   { MPX_STOPPED, MPX_RUNNING } MPX_status;
00011 
00016 typedef struct _MPX_EventSet {
00017   MPX_status status;
00019   struct _threadlist *mythr;
00021   struct _masterevent *(mev[PAPI_MAX_SW_MPX_EVENTS]);
00023   int num_events;
00025   long long start_c, stop_c;
00026   long long start_values[PAPI_MAX_SW_MPX_EVENTS];
00027   long long stop_values[PAPI_MAX_SW_MPX_EVENTS];
00028   long long start_hc[PAPI_MAX_SW_MPX_EVENTS];
00029 } MPX_EventSet;
00030 
00031 typedef struct EventSetMultiplexInfo {
00032   MPX_EventSet *mpx_evset;
00033   int ns;
00034   int flags;
00035 } EventSetMultiplexInfo_t;
00036 
00037 int mpx_check( int EventSet );
00038 int mpx_init( int );
00039 int mpx_add_event( MPX_EventSet **, int EventCode, int domain,
00040            int granularity );
00041 int mpx_remove_event( MPX_EventSet **, int EventCode );
00042 int MPX_add_events( MPX_EventSet ** mpx_events, int *event_list, int num_events,
00043             int domain, int granularity );
00044 int MPX_stop( MPX_EventSet * mpx_events, long long *values );
00045 int MPX_cleanup( MPX_EventSet ** mpx_events );
00046 void MPX_shutdown( void );
00047 int MPX_reset( MPX_EventSet * mpx_events );
00048 int MPX_read( MPX_EventSet * mpx_events, long long *values, int called_by_stop );
00049 int MPX_start( MPX_EventSet * mpx_events );
00050 
00051 #endif /* MULTIPLEX_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines