PAPI_TOT_INS Problem in ARMv7

Posted:
Sat Sep 14, 2013 11:09 pm
by aflorenzon
Hello
I'm having trouble using the event "PAPI_TOT_INS" in ARMv7.
When I run "make fulltest", the following error occurs return:
Error in PAPI_add_event (PAPI_TOT_INS): Permission level does not permit operation
Can anyone help?
Thanks.
Re: PAPI_TOT_INS Problem in ARMv7

Posted:
Sun Sep 15, 2013 10:48 am
by aflorenzon
And the following behavior occurs when you run an application to find the total number of instructions:
Execution 1:
./my_program
out: PAPI_TOT_INS = 23339111815
Execution 2:
./my_program
out: PAPI_TOT_INS = 1831345992
Why?
-------------------------------------------------------------------------------------------------------------------
The code:
int main(int argc, char **argv){
int EventSet = PAPI_NULL;
unsigned long long valor = 0;
PAPI_library_init(PAPI_VER_CURRENT);
PAPI_create_eventset(&EventSet);
PAPI_add_event(EventSet, PAPI_TOT_INS);
PAPI_start(EventSet);
PAPI_reset(EventSet);
int *vetor;
vetor = (int*) malloc(sizeof(int)*N);
leEntrada(vetor);
par_impar(vetor);
PAPI_read(EventSet, &valor);
printf("PAPI_TOT_INS = %llu\n", valor);
PAPI_stop(EventSet, NULL);
return 0;
}
Can anyone help?
Thanks.