event_name_lib.c File Reference

Include dependency graph for event_name_lib.c:

Go to the source code of this file.

Functions

char * get_offcore_event (char *event, int size)
char * get_instructions_event (char *event, int size)

Function Documentation

char* get_instructions_event ( char *  event,
int  size 
)

Definition at line 69 of file event_name_lib.c.

00069                                                     {
00070 
00071    const PAPI_hw_info_t *hwinfo;
00072 
00073    hwinfo = PAPI_get_hardware_info();
00074    if ( hwinfo == NULL ) {
00075     return NULL;
00076    }
00077 
00078    if (hwinfo->vendor == PAPI_VENDOR_INTEL) {
00079 
00080       if ( hwinfo->cpuid_family == 6) {
00081      strncpy(event,"INSTRUCTIONS_RETIRED",size);
00082      return event;
00083       }
00084 
00085       if ( hwinfo->cpuid_family == 15) {
00086      strncpy(event,"INSTR_RETIRED:NBOGUSNTAG",size);
00087      return event;
00088       }
00089 
00090 
00091       return NULL;
00092    }
00093    else if (hwinfo->vendor == PAPI_VENDOR_AMD) {
00094      strncpy(event,"RETIRED_INSTRUCTIONS",size);
00095      return event;
00096    }
00097 
00098    return NULL;
00099 }

Here is the call graph for this function:

Here is the caller graph for this function:

char* get_offcore_event ( char *  event,
int  size 
)

Definition at line 7 of file event_name_lib.c.

00007                                                {
00008 
00009    const PAPI_hw_info_t *hwinfo;
00010 
00011    hwinfo = PAPI_get_hardware_info();
00012    if ( hwinfo == NULL ) {
00013     return NULL;
00014    }
00015 
00016    if (hwinfo->vendor == PAPI_VENDOR_INTEL) {
00017 
00018       if ( hwinfo->cpuid_family == 6) {
00019     switch(hwinfo->cpuid_model) {
00020        case 26:
00021            case 30:
00022        case 31: /* Nehalem */
00023        case 46: /* Nehalem EX */
00024                 strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:LOCAL_DRAM",size);
00025             return event;
00026                 break;
00027        case 37:
00028        case 44: /* Westmere */
00029        case 47: /* Westmere EX */
00030                 strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:LOCAL_DRAM",size);
00031             return event;
00032                 break;
00033 
00034        case 45: /* SandyBridge EP */
00035        case 42: /* SandyBridge */
00036                 strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:ANY_RESPONSE",size);
00037             return event;
00038             break;
00039 
00040        case 58: /* IvyBridge */
00041        case 62: /* Ivy Trail */
00042                 strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:ANY_RESPONSE",size);
00043             return event;
00044             break;
00045 
00046        case 60: /* Haswell */
00047        case 69:
00048        case 70:
00049        case 63: /* Haswell EP */
00050                 strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:ANY_RESPONSE",size);
00051             return event;
00052             break;
00053 
00054        case 87: /* Knights Landing */
00055             strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:ANY_RESPONSE",size);
00056             return event;
00057             break;
00058      }
00059       }
00060       return NULL;
00061    }
00062    else if (hwinfo->vendor == PAPI_VENDOR_AMD) {
00063       return NULL;
00064    }
00065 
00066    return NULL;
00067 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 8 Sep 2016 for PAPI by  doxygen 1.6.1