Last active
August 29, 2015 14:19
-
-
Save gchavez2/abea27605b6259c9dc17 to your computer and use it in GitHub Desktop.
Necessary additions to C file to get access to performance counters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <papi.h> | |
#define NUM_EVENTS 1 | |
int main ( int argc, char ** argv ) { | |
int Events[NUM_EVENTS] = {PAPI_TLB_DM}; //Data TLB misses | |
<your code> | |
PAPI_read_counters(values, NUM_EVENTS); | |
printf("PAPI_TLB_DM = %lld \n",values[0]); | |
PAPI_stop_counters(values, NUM_EVENTS); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment