perf_event_uncore_lib.c File Reference

Include dependency graph for perf_event_uncore_lib.c:

Go to the source code of this file.

Functions

char * get_uncore_event (char *event, int size)

Function Documentation

char* get_uncore_event ( char *  event,
int  size 
)

Definition at line 7 of file perf_event_uncore_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,"nhm_unc::UNC_CLK_UNHALTED",size);
00025             return event;
00026                 break;
00027        case 37:
00028        case 44: /* Westmere */
00029        case 47: /* Westmere EX */
00030                 strncpy(event,"wsm_unc::UNC_CLK_UNHALTED",size);
00031             return event;
00032                 break;
00033 
00034        case 62: /* Ivy Trail */
00035        case 45: /* SandyBridge EP */
00036                 strncpy(event,"snbep_unc_imc0::UNC_M_CLOCKTICKS",size);
00037             return event;
00038             break;
00039        case 42: /* SandyBridge */
00040                 strncpy(event,"snb_unc_cbo0::UNC_CLOCKTICKS",size);
00041             return event;
00042             break;
00043        case 58: /* IvyBridge */
00044                 strncpy(event,"ivb_unc_cbo0::UNC_CLOCKTICKS",size);
00045             return event;
00046             break;
00047        case 63: /*haswell EP*/
00048             strncpy(event,"hswep_unc_cbo0::UNC_C_CLOCKTICKS",size);
00049             return event;
00050             break;
00051 
00052        case 87: /*Knights Landing*/
00053             strncpy(event,"knl_unc_imc0::UNC_M_D_CLOCKTICKS",size);
00054             return event;
00055             break;
00056     }
00057       }
00058       return NULL;
00059    }
00060    else if (hwinfo->vendor == PAPI_VENDOR_AMD) {
00061       if ( hwinfo->cpuid_family == 21) {
00062          /* For kernel 3.9 at least */
00063      strncpy(event,"DRAM_ACCESSES:ALL",size);
00064          return event;
00065       }
00066       return NULL;
00067    }
00068 
00069    return NULL;
00070 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 17 Nov 2016 for PAPI by  doxygen 1.6.1