Simple Scilab API for PAPI (Performance Application Programming Interface).
- Install PAPI >=5.5.1
- Run
scilab
in sPAPI directory - Compile
sPAPI_register
,sPAPI_tic
, andsPAPI_toc
functions from Scilab console using ilib_mex_build function:
ilib_mex_build('sPAPI', ['sPAPI_tic', 'sPAPI_tic', 'cmex'; 'sPAPI_toc', 'sPAPI_toc', 'cmex'; 'sPAPI_register', 'sPAPI_register', 'cmex'], [], [], '', '-lpapi', '', '');
- Register hardware performance monitoring counters (PMC) using preset or native events:
>> sPAPI_register('FP_ARITH:SCALAR_SINGLE', 'L1D:REPLACEMENT', 'PAPI_L2_ICA')
- Start counters:
>> sPAPI_tic
- Read counters measurements:
>> sPAPI_toc
ans = [0 577 1123]
- The number of hardware counters available on the system defines the upper limit of counters you can register using
sPAPI_register
function. - Not all hardware counters can be mixed and used simultaneously.
- Use new api_scilab 6.0 for sPAPI