event_name_lib.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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

Function Documentation

char* get_instructions_event ( char *  event,
int  size 
)

Definition at line 65 of file event_name_lib.c.

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

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      }
00055       }
00056       return NULL;
00057    }
00058    else if (hwinfo->vendor == PAPI_VENDOR_AMD) {
00059       return NULL;
00060    }
00061 
00062    return NULL;
00063 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 26 Jan 2016 for PAPI by  doxygen 1.6.1