PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 57 of file event_name_lib.c.

57  {
58 
59  const PAPI_hw_info_t *hwinfo;
60 
61  hwinfo = PAPI_get_hardware_info();
62  if ( hwinfo == NULL ) {
63  return NULL;
64  }
65 
66  if (hwinfo->vendor == PAPI_VENDOR_INTEL) {
67 
68  if ( hwinfo->cpuid_family == 6) {
69  strncpy(event,"INSTRUCTIONS_RETIRED",size);
70  return event;
71  }
72 
73  if ( hwinfo->cpuid_family == 15) {
74  strncpy(event,"INSTR_RETIRED:NBOGUSNTAG",size);
75  return event;
76  }
77 
78 
79  return NULL;
80  }
81  else if (hwinfo->vendor == PAPI_VENDOR_AMD) {
82  strncpy(event,"RETIRED_INSTRUCTIONS",size);
83  return event;
84  }
85 
86  return NULL;
87 }
Hardware info structure.
Definition: papi.h:777
device[deviceId] domain[domainId] event
Definition: linux-cuda.c:306
char *long long size
Definition: iozone.c:12023
int cpuid_family
Definition: papi.h:789
#define PAPI_VENDOR_INTEL
Definition: papi.h:346
int vendor
Definition: papi.h:784
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
Definition: papi.c:6111
#define PAPI_VENDOR_AMD
Definition: papi.h:347

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.

7  {
8 
9  const PAPI_hw_info_t *hwinfo;
10 
11  hwinfo = PAPI_get_hardware_info();
12  if ( hwinfo == NULL ) {
13  return NULL;
14  }
15 
16  if (hwinfo->vendor == PAPI_VENDOR_INTEL) {
17 
18  if ( hwinfo->cpuid_family == 6) {
19  switch(hwinfo->cpuid_model) {
20  case 26:
21  case 30:
22  case 31: /* Nehalem */
23  case 46: /* Nehalem EX */
24  strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:LOCAL_DRAM",size);
25  return event;
26  break;
27  case 37:
28  case 44: /* Westmere */
29  case 47: /* Westmere EX */
30  strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:LOCAL_DRAM",size);
31  return event;
32  break;
33 
34  case 45: /* SandyBridge EP */
35  case 42: /* SandyBridge */
36  strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:ANY_RESPONSE",size);
37  return event;
38  break;
39 
40  case 58: /* IvyBridge */
41  case 62: /* Ivy Trail */
42  strncpy(event,"OFFCORE_RESPONSE_0:DMND_DATA_RD:ANY_RESPONSE",size);
43  return event;
44  break;
45 
46  }
47  }
48  return NULL;
49  }
50  else if (hwinfo->vendor == PAPI_VENDOR_AMD) {
51  return NULL;
52  }
53 
54  return NULL;
55 }
Hardware info structure.
Definition: papi.h:777
device[deviceId] domain[domainId] event
Definition: linux-cuda.c:306
char *long long size
Definition: iozone.c:12023
int cpuid_model
Definition: papi.h:790
int cpuid_family
Definition: papi.h:789
#define PAPI_VENDOR_INTEL
Definition: papi.h:346
int vendor
Definition: papi.h:784
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
Definition: papi.c:6111
#define PAPI_VENDOR_AMD
Definition: papi.h:347

Here is the call graph for this function:

Here is the caller graph for this function: