How to put 7 events in one eventset in PAPI

227 Views Asked by At

In PAPI Im trying to put 7 events in one eventset so I can read 7 results in one operation but I always get return -1 ,can anyone help me?my code like this:

int events1[] = {
PAPI_L1_TCM,
PAPI_L2_TCM,
PAPI_L3_TCM,
PAPI_MEM_WCY,
PAPI_RES_STL,
PAPI_TLB_DM,
PAPI_TLB_IM};
PAPI_library_init(PAPI_VER_CURRENT);
i = PAPI_start_counters(events1,7);

where i appears to be -1 which means PAPI_EINVAL.

I tried change the value PAPI_NUM_TLS but it didn't work.

1

There are 1 best solutions below

0
On

I have the same problem now. But as I have found, the trouble comes from 5th and 6th counters. Here: https://icl.cs.utk.edu/projects/papi/wiki/PAPI3:PAPI_add_event.3 at IBM POWER6 NOTES there is mentioned that these two counters are specific and as I understand should count concrete events. I have not found the solution yet. For 5th one, I added PAPI_TOT_INS and seems to work but for 6th one PAPI_TOT_CYC gives PAPI_ECNFLCT error as they say.