+ } else if (RtsFlags.PapiFlags.eventType==PAPI_USER_EVENTS) {
+ nat i;
+ char *name;
+ int code;
+ for (i = 0; i < RtsFlags.PapiFlags.numUserEvents; i++) {
+ name = RtsFlags.PapiFlags.userEvents[i];
+ PAPI_CHECK(PAPI_event_name_to_code(name, &code))
+ papi_add_event(name, code);
+ }
+ } else {
+ // PAPI_ADD_EVENT(PAPI_L1_DCA); // L1 data cache accesses
+ // PAPI_ADD_EVENT(PAPI_L1_ICR); // L1 instruction cache reads
+ // PAPI_ADD_EVENT(PAPI_L1_ICM); // L1 instruction cache misses
+ // PAPI_ADD_EVENT(PAPI_L1_STM); // L1 store misses
+ // PAPI_ADD_EVENT(PAPI_L1_DCM); // L1 data cache misses
+ // PAPI_ADD_EVENT(PAPI_L1_LDM); // L1 load misses
+ // PAPI_ADD_EVENT(PAPI_L2_TCM); // L2 cache misses
+ // PAPI_ADD_EVENT(PAPI_L2_STM); // L2 store misses
+ // PAPI_ADD_EVENT(PAPI_L2_DCW); // L2 data cache writes
+ // PAPI_ADD_EVENT(PAPI_L2_DCR); // L2 data cache reads
+ // PAPI_ADD_EVENT(PAPI_L2_TCW); // L2 cache writes
+ // PAPI_ADD_EVENT(PAPI_L2_TCR); // L2 cache reads
+ // PAPI_ADD_EVENT(PAPI_CA_CLN); // exclusive access to clean cache line
+ // PAPI_ADD_EVENT(PAPI_TLB_DM); // TLB misses
+ PAPI_ADD_EVENT(PAPI_TOT_INS); // Total instructions
+ PAPI_ADD_EVENT(PAPI_TOT_CYC); // Total instructions
+ // PAPI_ADD_EVENT(PAPI_CA_SHR); // exclusive access to shared cache line
+ // PAPI_ADD_EVENT(PAPI_RES_STL); // Cycles stalled on any resource
+