src/components/io/linux-io.c
// Triggered by eventset operations like add or remove.
// We store the order of the events, and the number.
Triggered by eventset operations like add or remove.
We store the order of the events, and the number.
Triggered by eventset operations like add or remove . We store the order of the events and the number .
static int
_io_update_control_state( hwd_control_state_t *ctl, 
        NativeInfo_t *native,
        int count, 
        hwd_context_t *ctx )
{
    (void) ctx;
    _io_control_state_t *myCtl = (_io_control_state_t*) ctl;
    int i, index;
    myCtl->EventSetCount = count;
    if (count==0) return PAPI_OK;
    for( i = 0; i < count; i++ ) {
        index = native[i].ni_event;
        myCtl->EventSetIdx[i] = index;    
        native[i].ni_position = i;
    }
    return PAPI_OK;
}
static int _io_update_control_state ( hwd_control_state_t * ctl , NativeInfo_t * native , int count , hwd_context_t * ctx ) { ( void ) ctx ; _io_control_state_t * myCtl = ( _io_control_state_t * ) ctl ; int i , index ; myCtl -> EventSetCount = count ; if ( count == 0 ) return PAPI_OK ; for ( i = 0 ; i < count ; i ++ ) { index = native [ i ] . ni_event ; myCtl -> EventSetIdx [ i ] = index ; native [ i ] . ni_position = i ; } return PAPI_OK ; }
Triggered by eventset operations like add or remove.
Triggered by eventset operations like add or remove .
/* if no events, return */ /* We have no constraints on event position, so any event */ /* can be in any slot.                                    */