PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
peu_libpfm4_events.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int _peu_libpfm4_setup_presets (char *name, int type, int cidx)
 
int _peu_libpfm4_ntv_enum_events (unsigned int *EventCode, int modifier, struct native_event_table_t *event_table)
 
int _peu_libpfm4_ntv_name_to_code (char *ntv_name, unsigned int *EventCode, struct native_event_table_t *event_table)
 
int _peu_libpfm4_ntv_code_to_name (unsigned int EventCode, char *name, int len, struct native_event_table_t *event_table)
 
int _peu_libpfm4_ntv_code_to_descr (unsigned int EventCode, char *name, int len, struct native_event_table_t *event_table)
 
int _peu_libpfm4_shutdown (struct native_event_table_t *event_table)
 
int _peu_libpfm4_init (papi_vector_t *my_vector, struct native_event_table_t *event_table, int pmu_type)
 
int _peu_libpfm4_ntv_code_to_info (unsigned int EventCode, PAPI_event_info_t *info, struct native_event_table_t *event_table)
 
int _peu_libpfm4_setup_counters (struct perf_event_attr *attr, int event, struct native_event_table_t *event_table)
 

Function Documentation

int _peu_libpfm4_init ( papi_vector_t my_vector,
struct native_event_table_t event_table,
int  pmu_type 
)

Definition at line 1366 of file peu_libpfm4_events.c.

1368  {
1369 
1370  int detected_pmus=0;
1371  int i;
1372  pfm_err_t retval = PFM_SUCCESS;
1373  unsigned int ncnt;
1374  pfm_pmu_info_t pinfo;
1375 
1376  /* allocate the native event structure */
1377 
1378  event_table->num_native_events=0;
1379  event_table->pmu_type=pmu_type;
1380 
1381  event_table->native_events=calloc(NATIVE_EVENT_CHUNK,
1382  sizeof(struct native_event_t));
1383  if (event_table->native_events==NULL) {
1384  return PAPI_ENOMEM;
1385  }
1387 
1388  /* Count number of present PMUs */
1389  detected_pmus=0;
1390  ncnt=0;
1391 
1392  my_vector->cmp_info.num_cntrs=0;
1393 
1394  SUBDBG("Detected pmus:\n");
1395  for(i=0;i<PFM_PMU_MAX;i++) {
1396  memset(&pinfo,0,sizeof(pfm_pmu_info_t));
1397  retval=pfm_get_pmu_info(i, &pinfo);
1398  if (retval!=PFM_SUCCESS) {
1399  continue;
1400  }
1401 
1402  if (pmu_is_present_and_right_type(&pinfo,pmu_type)) {
1403  SUBDBG("\t%d %s %s %d\n",i,pinfo.name,pinfo.desc,pinfo.type);
1404 
1405  detected_pmus++;
1406  ncnt+=pinfo.nevents;
1407 
1408  my_vector->cmp_info.num_cntrs += pinfo.num_cntrs+
1409  pinfo.num_fixed_cntrs;
1410  }
1411  }
1412  SUBDBG("%d native events detected on %d pmus\n",ncnt,detected_pmus);
1413 
1414  my_vector->cmp_info.num_native_events = ncnt;
1415 
1416  SUBDBG( "num_counters: %d\n", my_vector->cmp_info.num_cntrs );
1417 
1418  return PAPI_OK;
1419 }
memset(eventId, 0, size)
#define PAPI_ENOMEM
Definition: fpapi.h:107
struct native_event_t * native_events
return PAPI_OK
Definition: linux-nvml.c:458
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
int i
Definition: fileop.c:140
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static int pmu_is_present_and_right_type(pfm_pmu_info_t *pinfo, int type)
ssize_t retval
Definition: libasync.c:338
#define NATIVE_EVENT_CHUNK

Here is the call graph for this function:

Here is the caller graph for this function:

int _peu_libpfm4_ntv_code_to_descr ( unsigned int  EventCode,
char *  name,
int  len,
struct native_event_table_t event_table 
)

Definition at line 932 of file peu_libpfm4_events.c.

935 {
936  int ret,a,first_mask=1;
937  char *eventd, *tmp=NULL;
938  pfm_event_info_t gete;
939 
940  pfm_event_attr_info_t ainfo;
941  char *b;
942  char event_string[BUFSIZ],*ptr;
943 
944  struct native_event_t *our_event;
945 
946  SUBDBG("ENTER %#x\n",EventCode);
947 
948  our_event=find_existing_event_by_number(EventCode,event_table);
949  if (our_event==NULL) {
950  return PAPI_ENOEVNT;
951  }
952 
953  SUBDBG("Getting info on %#x\n",our_event->libpfm4_idx);
954 
955  /* libpfm requires the structure be zeroed */
956  memset( &gete, 0, sizeof ( gete ) );
957 
958  ret=pfm_get_event_info(our_event->libpfm4_idx, PFM_OS_PERF_EVENT, &gete);
959  if (ret<0) {
960  SUBDBG("Return=%d\n",ret);
961  return _papi_libpfm4_error(ret);
962  }
963 
964  eventd=strdup(gete.desc);
965 
966  tmp = ( char * ) malloc( strlen( eventd ) + 1 );
967  if ( tmp == NULL ) {
968  free( eventd );
969  return PAPI_ENOMEM;
970  }
971 
972  tmp[0] = '\0';
973  strcat( tmp, eventd );
974  free( eventd );
975 
976  /* Handle Umasks */
977 
978  /* attributes concactinated onto end of descr separated by ", masks" */
979  /* then comma separated */
980 
981  strcpy(event_string,our_event->allocated_name);
982 
983  /* Point to first umask */
984 
985  /* Skip the pmu name :: if one exists */
986  if (strstr(event_string,"::")) {
987  ptr=strstr(event_string,"::");
988  ptr+=2;
989  b=strtok(ptr,":");
990  }
991  else {
992  b=strtok(event_string,":");
993  }
994 
995  /* if no umask, then done */
996  if (!b) {
997  SUBDBG("No colon!\n"); /* no umask */
998  goto descr_in_tmp;
999  }
1000 
1001  /* skip event name, get first umask (but if it is a bool or int mask type, we only want the name part not the =x part) */
1002  b=strtok(NULL,":=");
1003  if (!b) {
1004  SUBDBG("Skipping to first mask failed\n");
1005  goto descr_in_tmp;
1006  }
1007 
1008  /* loop through all umasks, seeing which match */
1009  while(b) {
1010  a=0;
1011  while(1) {
1012 
1013 
1014  memset(&ainfo,0,sizeof(pfm_event_attr_info_t));
1015 
1016  ret = pfm_get_event_attr_info(our_event->libpfm4_idx, a,
1017  PFM_OS_PERF_EVENT, &ainfo);
1018  if (ret != PFM_SUCCESS) {
1019  free( tmp );
1020  SUBDBG("get_event_attr failed %s\n",pfm_strerror(ret));
1021  return _papi_libpfm4_error(ret);
1022  }
1023 
1024  SUBDBG("Compare: ainfo.name: %s, ainfo.type: %d, with event mask: %s\n", ainfo.name, ainfo.type, b);
1025 
1026  /* Plain UMASK case */
1027  if (ainfo.type == PFM_ATTR_UMASK) {
1028  if (!strcasecmp(ainfo.name, b)) {
1029  int new_length;
1030 
1031  SUBDBG("Found %s\n",b);
1032  new_length=strlen(ainfo.desc);
1033 
1034  if (first_mask) {
1035  tmp=realloc(tmp,strlen(tmp)+new_length+1+strlen(", masks:"));
1036  strcat(tmp,", masks:");
1037  first_mask=0;
1038  }
1039  else {
1040  tmp=realloc(tmp,strlen(tmp)+new_length+1+strlen(","));
1041  strcat(tmp,",");
1042  }
1043  strcat(tmp,ainfo.desc);
1044 
1045  goto found_attr;
1046  }
1047  }
1048 
1049  /* Boolean Case */
1050  if (ainfo.type == PFM_ATTR_MOD_BOOL) {
1051  if (!strcasecmp(ainfo.name, b)) {
1052  int new_length;
1053 
1054  SUBDBG("Found %s\n",b);
1055  new_length=strlen(ainfo.desc);
1056 
1057  if (first_mask) {
1058  tmp=realloc(tmp,strlen(tmp)+new_length+1+strlen(", masks:"));
1059  strcat(tmp,", masks:");
1060  first_mask=0;
1061  }
1062  else {
1063  tmp=realloc(tmp,strlen(tmp)+new_length+1+strlen(","));
1064  strcat(tmp,",");
1065  }
1066  strcat(tmp,ainfo.desc);
1067 
1068  b=strtok(NULL,":"); // skip value provided with this attribute
1069  goto found_attr;
1070  }
1071  }
1072 
1073  /* Integer Case */
1074  if (ainfo.type == PFM_ATTR_MOD_INTEGER) {
1075  if (!strcasecmp(ainfo.name, b)) {
1076  int new_length;
1077 
1078  SUBDBG("Found %s\n",b);
1079  new_length=strlen(ainfo.desc);
1080 
1081  if (first_mask) {
1082  tmp=realloc(tmp,strlen(tmp)+new_length+1+strlen(", masks:"));
1083  strcat(tmp,", masks:");
1084  first_mask=0;
1085  }
1086  else {
1087  tmp=realloc(tmp,strlen(tmp)+new_length+1+strlen(","));
1088  strcat(tmp,",");
1089  }
1090  strcat(tmp,ainfo.desc);
1091 
1092  b=strtok(NULL,":"); // skip value provided with this attribute
1093  goto found_attr;
1094  }
1095  }
1096 
1097  a++;
1098  }
1099 
1100  SUBDBG("attr=%s not found for event %s\n", b, ainfo.name);
1101 
1102  return PAPI_EATTR;
1103 
1104 found_attr:
1105 
1106  b=strtok(NULL,":=");
1107  }
1108 
1109  /* We are done and the description to copy is in tmp */
1110 descr_in_tmp:
1111  strncpy( ntv_descr, tmp, ( size_t ) len );
1112  if ( ( int ) strlen( tmp ) > len - 1 )
1113  ret = PAPI_EBUF;
1114  else
1115  ret = PAPI_OK;
1116  free( tmp );
1117 
1118  SUBDBG("PFM4 Code: %#x %s\n",EventCode,ntv_descr);
1119 
1120  return ret;
1121 }
memset(eventId, 0, size)
#define PAPI_ENOMEM
Definition: fpapi.h:107
#define PAPI_ENOEVNT
Definition: fpapi.h:112
#define PAPI_EATTR
Definition: fpapi.h:127
return PAPI_OK
Definition: linux-nvml.c:458
int _papi_libpfm4_error(int pfm_error)
static double a[MATRIX_SIZE][MATRIX_SIZE]
Definition: rapl_basic.c:37
long long ret
Definition: iozone.c:1346
free(dummyfile[xx])
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
strcat(command, mountname)
strcpy(filename, default_filename)
static struct native_event_t * find_existing_event_by_number(int eventnum, struct native_event_table_t *event_table)
static double b[MATRIX_SIZE][MATRIX_SIZE]
Definition: rapl_basic.c:38
#define PAPI_EBUF
Definition: fpapi.h:125
long long tmp
Definition: iozone.c:12031
char * ptr
Definition: iozone.c:23586

Here is the call graph for this function:

Here is the caller graph for this function:

int _peu_libpfm4_ntv_code_to_info ( unsigned int  EventCode,
PAPI_event_info_t info,
struct native_event_table_t event_table 
)

Definition at line 1125 of file peu_libpfm4_events.c.

1128 {
1129 
1130 
1131  struct native_event_t *our_event;
1132 
1133  SUBDBG("ENTER %#x\n",EventCode);
1134 
1135  our_event=find_existing_event_by_number(EventCode,event_table);
1136  if (our_event==NULL) {
1137  return PAPI_ENOEVNT;
1138  }
1139 
1140  strncpy(info->symbol, our_event->allocated_name, sizeof(info->symbol));
1141 
1142  if (strlen(our_event->allocated_name) > sizeof(info->symbol)) {
1143  return PAPI_EBUF;
1144  }
1145 
1147  sizeof(info->long_descr),event_table);
1148 
1149  return PAPI_OK;
1150 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
char long_descr[PAPI_HUGE_STR_LEN]
Definition: papi.h:964
char symbol[PAPI_HUGE_STR_LEN]
Definition: papi.h:961
return PAPI_OK
Definition: linux-nvml.c:458
int _peu_libpfm4_ntv_code_to_descr(unsigned int EventCode, char *ntv_descr, int len, struct native_event_table_t *event_table)
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static struct native_event_t * find_existing_event_by_number(int eventnum, struct native_event_table_t *event_table)
#define PAPI_EBUF
Definition: fpapi.h:125

Here is the call graph for this function:

Here is the caller graph for this function:

int _peu_libpfm4_ntv_code_to_name ( unsigned int  EventCode,
char *  name,
int  len,
struct native_event_table_t event_table 
)

Definition at line 885 of file peu_libpfm4_events.c.

888 {
889 
890  struct native_event_t *our_event;
891 
892  SUBDBG("ENTER %#x\n",EventCode);
893 
894  our_event=find_existing_event_by_number(EventCode,event_table);
895  if (our_event==NULL) {
896  return PAPI_ENOEVNT;
897  }
898 
899  strncpy(ntv_name,our_event->allocated_name,len);
900 
901  if (strlen(our_event->allocated_name) > (unsigned)len) {
902  return PAPI_EBUF;
903  }
904 
905  return PAPI_OK;
906 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
return PAPI_OK
Definition: linux-nvml.c:458
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static struct native_event_t * find_existing_event_by_number(int eventnum, struct native_event_table_t *event_table)
#define PAPI_EBUF
Definition: fpapi.h:125

Here is the call graph for this function:

Here is the caller graph for this function:

int _peu_libpfm4_ntv_enum_events ( unsigned int EventCode,
int  modifier,
struct native_event_table_t event_table 
)

Definition at line 1171 of file peu_libpfm4_events.c.

1173  {
1174 
1175  int code,ret;
1176  struct native_event_t *current_event;
1177 
1178  SUBDBG("ENTER\n");
1179 
1180  /* return first event if so specified */
1181  if ( modifier == PAPI_ENUM_FIRST ) {
1182 
1183  unsigned int papi_event=0;
1184 
1185  SUBDBG("ENUM_FIRST\n");
1186 
1187  code=get_event_first_active(event_table->pmu_type);
1188  SUBDBG("ENUM_FIRST code: %#x\n",code);
1189  if (code < 0 ) {
1190  return code;
1191  }
1192 
1193  /* convert the libpfm4 event to a PAPI event */
1194  ret=convert_pfmidx_to_native(code, &papi_event,event_table);
1195 
1196  *PapiEventCode=(unsigned int)papi_event;
1197 
1198  SUBDBG("FOUND %#x (from %#x) ret=%d\n",*PapiEventCode,code,ret);
1199 
1200  return ret;
1201  }
1202 
1203  /* If we get this far, we're looking for a */
1204  /* next-event. So gather info on the current one */
1205  current_event=find_existing_event_by_number(*PapiEventCode,
1206  event_table);
1207  if (current_event==NULL) {
1208  SUBDBG("EVENTS %#x not found\n",*PapiEventCode);
1209  return PAPI_ENOEVNT;
1210  }
1211 
1212 
1213  /* Handle looking for the next event */
1214 
1215  if ( modifier == PAPI_ENUM_EVENTS ) {
1216 
1217  unsigned int papi_event=0;
1218 
1219  SUBDBG("PAPI_ENUM_EVENTS %#x\n",*PapiEventCode);
1220 
1221  code=current_event->libpfm4_idx;
1222 
1223  ret=find_next_no_aliases(code,event_table->pmu_type);
1224  SUBDBG("find_next_no_aliases() Returned %#x\n",ret);
1225  if (ret<0) {
1226  return ret;
1227  }
1228 
1229  /* Convert libpfm4 event code to PAPI event code */
1230  ret=convert_pfmidx_to_native(ret, &papi_event, event_table);
1231  if (ret<0) {
1232  SUBDBG("Couldn't convert to native %d %s\n",
1233  ret,PAPI_strerror(ret));
1234  return ret;
1235  }
1236 
1237  *PapiEventCode=(unsigned int)papi_event;
1238 
1239  SUBDBG("Returning PAPI_OK\n");
1240 
1241  return ret;
1242  }
1243 
1244  /* We don't handle PAPI_NTV_ENUM_UMASK_COMBOS */
1245  if ( modifier == PAPI_NTV_ENUM_UMASK_COMBOS ) {
1246  return PAPI_ENOIMPL;
1247  }
1248 
1249  /* Enumerate PAPI_NTV_ENUM_UMASKS (umasks on an event) */
1250  if ( modifier == PAPI_NTV_ENUM_UMASKS ) {
1251 
1252  int max_umask,next_umask;
1253  char umask_string[BUFSIZ],new_name[BUFSIZ];
1254 
1255  SUBDBG("Finding maximum mask in event %s\n",
1256  current_event->allocated_name);
1257 
1258  max_umask=find_max_umask(current_event);
1259  SUBDBG("Found max %d\n",max_umask);
1260 
1261  if (max_umask<0) {
1262  if (max_umask==PFM_ERR_UMASK) {
1263  max_umask=-1; /* needed for find_next_umask() to work */
1264  /* indicates the event as passed had no */
1265  /* umask in it. */
1266  }
1267  else {
1268  return _papi_libpfm4_error(max_umask);
1269  }
1270  }
1271 
1272  next_umask=find_next_umask(current_event,max_umask,
1273  umask_string);
1274 
1275  SUBDBG("Found next umask index %d, umask_string: %s\n",next_umask, umask_string);
1276 
1277  if (next_umask>=0) {
1278 
1279  unsigned int papi_event;
1280 
1281  // Build the event name of next event to be listed (include pmu, event, and mask)
1282  sprintf(new_name,"%s::%s:%s",current_event->pmu,current_event->base_name, umask_string);
1283 
1284  SUBDBG("Found new name %s\n",new_name);
1285 
1286  // The _peu_libpfm4_ntv_name_to_code function calls code that needs to know if we are listing events or counting them.
1287  // If listing, then there is some special things it has to do with umasks to get the listing to work correctly.
1288  enum_call = 1;
1289  ret=_peu_libpfm4_ntv_name_to_code(new_name,&papi_event,
1290  event_table);
1291  enum_call = 0;
1292  if (ret!=PAPI_OK) {
1293  return PAPI_ENOEVNT;
1294  }
1295 
1296  *PapiEventCode=(unsigned int)papi_event;
1297  SUBDBG("found code %#x\n",*PapiEventCode);
1298 
1299  return PAPI_OK;
1300  }
1301 
1302  SUBDBG("couldn't find umask\n");
1303 
1304  return _papi_libpfm4_error(next_umask);
1305 
1306  }
1307 
1308  /* An unknown enumeration method was indicated */
1309 
1310  return PAPI_ENOIMPL;
1311 }
sprintf(splash[splash_line++],"\tIozone: Performance Test of File I/O\n")
#define PAPI_ENOIMPL
Definition: fpapi.h:124
static int find_max_umask(struct native_event_t *current_event)
static int enum_call
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int find_next_no_aliases(int code, int pmu_type)
return PAPI_OK
Definition: linux-nvml.c:458
int _papi_libpfm4_error(int pfm_error)
long long ret
Definition: iozone.c:1346
int _peu_libpfm4_ntv_name_to_code(char *name, unsigned int *event_code, struct native_event_table_t *event_table)
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static int convert_pfmidx_to_native(int code, unsigned int *PapiEventCode, struct native_event_table_t *event_table)
static int get_event_first_active(int pmu_type)
static struct native_event_t * find_existing_event_by_number(int eventnum, struct native_event_table_t *event_table)
char * PAPI_strerror(int errorCode)
Definition: papi.c:4483
int
Definition: iozone.c:18528
static int find_next_umask(struct native_event_t *current_event, int current, char *umask_name)

Here is the call graph for this function:

Here is the caller graph for this function:

int _peu_libpfm4_ntv_name_to_code ( char *  ntv_name,
unsigned int EventCode,
struct native_event_table_t event_table 
)

Definition at line 818 of file peu_libpfm4_events.c.

820 {
821 
822  int actual_idx;
823  struct native_event_t *our_event;
824  int event_num;
825 
826  SUBDBG( "Converting %s\n", name);
827 
828  event_num=find_existing_event(name,event_table);
829 
830  if (event_num<0) {
831 
832  /* event currently doesn't exist, so try to find it */
833  /* using libpfm4 */
834 
835  SUBDBG("Using pfm to look up event %s\n",name);
836 
837  actual_idx=find_event(name, event_table->pmu_type);
838  if (actual_idx<0) {
839  return _papi_libpfm4_error(actual_idx);
840  }
841 
842  SUBDBG("Using %#x as the index\n",actual_idx);
843 
844  /* We were found in libpfm4, so allocate our copy of the event */
845 
846  our_event=allocate_native_event(name,actual_idx,event_table);
847  if (our_event==NULL) return PAPI_ENOEVNT;
848 
849  event_num=find_existing_event(name,event_table);
850  }
851 
852  if (event_num>=0) {
853  *event_code=event_num;
854  SUBDBG("Found code: %#x\n",*event_code);
855  return PAPI_OK;
856  }
857 
858  /* Failure here means allocate_native_event failed */
859 
860  SUBDBG("Event %s not found\n",name);
861 
862  return PAPI_ENOEVNT;
863 
864 }
static struct native_event_t * allocate_native_event(char *name, int event_idx, struct native_event_table_t *event_table)
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int find_event(char *name, int pmu_type)
return PAPI_OK
Definition: linux-nvml.c:458
int _papi_libpfm4_error(int pfm_error)
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
char * name
Definition: iozone.c:23648
static int find_existing_event(char *name, struct native_event_table_t *event_table)

Here is the call graph for this function:

Here is the caller graph for this function:

int _peu_libpfm4_setup_counters ( struct perf_event_attr attr,
int  event,
struct native_event_table_t event_table 
)

Definition at line 1437 of file peu_libpfm4_events.c.

1439  {
1440 
1441  struct native_event_t *our_event;
1442 
1443  our_event=find_existing_event_by_number(event,event_table);
1444  if (our_event==NULL) {
1445  return PAPI_ENOEVNT;
1446  }
1447 
1448  attr->config=our_event->config;
1449  attr->config1=our_event->config1;
1450  attr->config2=our_event->config2;
1451  attr->type=our_event->type;
1452 
1453  SUBDBG( "pe_event: config %#lx config1 %#lx type %x\n",
1454  attr->config,
1455  attr->config1,
1456  attr->type);
1457 
1458  return PAPI_OK;
1459 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
device[deviceId] domain[domainId] event
Definition: linux-cuda.c:306
return PAPI_OK
Definition: linux-nvml.c:458
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
static struct native_event_t * find_existing_event_by_number(int eventnum, struct native_event_table_t *event_table)

Here is the call graph for this function:

Here is the caller graph for this function:

int _peu_libpfm4_setup_presets ( char *  name,
int  type,
int  cidx 
)
int _peu_libpfm4_shutdown ( struct native_event_table_t event_table)

Definition at line 1324 of file peu_libpfm4_events.c.

1324  {
1325 
1326  int i;
1327 
1328  APIDBG("Entry\n");
1329 
1330  /* clean out and free the native events structure */
1332 
1333  /* Only free if we're the last user */
1334 
1335  /* free memory allocated with strdup */
1336  for( i=0; i<event_table->num_native_events; i++) {
1337  free(event_table->native_events[i].base_name);
1338  free(event_table->native_events[i].pmu_plus_name);
1339  free(event_table->native_events[i].pmu);
1340  free(event_table->native_events[i].allocated_name);
1341  }
1342 
1343  memset(event_table->native_events,0,
1344  sizeof(struct native_event_t)*event_table->allocated_native_events);
1345  event_table->num_native_events=0;
1346  event_table->allocated_native_events=0;
1347  free(event_table->native_events);
1348 
1350 
1351  return PAPI_OK;
1352 }
memset(eventId, 0, size)
struct native_event_t * native_events
return PAPI_OK
Definition: linux-nvml.c:458
#define APIDBG(format, args...)
Definition: papi_debug.h:64
int i
Definition: fileop.c:140
inline_static int _papi_hwi_lock(int lck)
Definition: threads.h:64
free(dummyfile[xx])
inline_static int _papi_hwi_unlock(int lck)
Definition: threads.h:78
#define NAMELIB_LOCK
Definition: papi_internal.h:93

Here is the call graph for this function:

Here is the caller graph for this function: