PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
papi_user_events.c
Go to the documentation of this file.
1 
9 /* TODO:
10  * Think about how to support components
11  * Software multiplexing improvments
12  * Error bounds on multiplexed counts
13  *
14  * Keywords for getting info out of hw_info or something like it.
15  */
16 
17 
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <ctype.h>
22 
23 #include "papi.h"
24 #include "papi_internal.h"
25 #include "papi_vector.h" /* for _papi__hwd[]. Should we modify the */
26  /* code to not depend on component 0? */
27 #include "papi_memory.h"
28 #include "papi_user_events.h"
29 
30 #ifdef STATIC_USER_EVENTS
31 #include "papi_static_user_events.h"
32 #endif
33 
34 #define CONSTANT_DELIM "#define"
35 
36 #define SHOW_LOADS
37 extern unsigned int PAPI_NATIVE_EVENT_SHIFT;
38 extern unsigned int PAPI_NATIVE_UMASK_SHIFT;
39 
40 typedef struct def_list {
43  struct def_list *next;
44 } list_t;
45 
46 
48 unsigned int _papi_user_events_count = 0;
50 int first_time = 1;
51 
52 
53 void
55 {
56 #ifndef DEBUG
57  (void)ue; /* clean up unused parameter warning if debugging messages are not used */
58 #endif
59  INTDBG("User Event debug\n");
60  INTDBG("\tsymbol=%s\n", ue->symbol);
61  INTDBG("\toperation=%s\n", ue->operation);
62  INTDBG("\tcount=%d\n", ue->count);
63 }
64 
65 void
67 {
68  unsigned int i;
70  list_t *a,*b;
71 
72  for ( i = 0; i < _papi_user_events_count; i++ ) {
73  t = _papi_user_events + i;
74 
75  if ( t->short_desc != NULL )
76  free(t->short_desc);
77  if ( t->long_desc != NULL )
78  free(t->long_desc);
79 
80  }
81 
82  if ( _papi_user_events != NULL )
83  papi_free( _papi_user_events );
84 
85  _papi_user_events = NULL;
86  _papi_user_events_count = 0;
87 
88  /* cleanup the defines list too */
89  for ( a = defines.next; a != NULL; ) {
90  b=a->next;
91  papi_free(a);
92  a = b;
93  }
94 }
95 
96 void
98 {
100 
102  if (new == NULL) {
103  PAPIERROR("Unable to allocate %d bytes of memory.\n", sizeof(user_defined_event_t)*(1+_papi_user_events_count));
104  } else {
105  if (_papi_user_events != NULL) {
106  memcpy(new, _papi_user_events, _papi_user_events_count*sizeof(user_defined_event_t));
107  papi_free(_papi_user_events);
108  }
109 
110  memcpy( new + _papi_user_events_count, more, sizeof(user_defined_event_t) );
111 
112  _papi_user_events = new;
114  }
115 }
116 
117 int
119 {
120  char first = op[0];
121 
122  switch(first) {
123  case '+':
124  case '-':
125  case '*':
126  case '/':
127  case '%':
128  return 1;
129  default:
130  return 0;
131  }
132 }
133 
134 
135 /* Trims blank space from both ends of a string (in place).
136  Returns pointer to new start address */
137 static inline char *
138 trim_string( char *in )
139 {
140  int len, i = 0;
141  char *start = in;
142 
143  if ( in == NULL )
144  return ( in );
145  len = ( int ) strlen( in );
146  if ( len == 0 )
147  return ( in );
148  /* Trim left */
149  while ( i < len ) {
150  if ( isblank( in[i] ) ) {
151  in[i] = '\0';
152  start++;
153  } else
154  break;
155  i++;
156  }
157  /* Trim right */
158  i = ( int ) strlen( start ) - 1;
159  while ( i >= 0 ) {
160  if ( isblank( start[i] ) )
161  start[i] = '\0';
162  else
163  break;
164  i--;
165  }
166  return ( start );
167 }
168 
169 /* Calls trim_string to remove blank space;
170  Removes paired punctuation delimiters from
171  beginning and end of string. If the same punctuation
172  appears first and last (quotes, slashes) they are trimmed;
173  Also checks for the following pairs: () <> {} [] */
174 static inline char *
175 trim_note( char *in )
176 {
177  int len;
178  char *note, start, end;
179 
180  note = trim_string( in );
181  if ( note != NULL ) {
182  len = ( int ) strlen( note );
183  if ( len > 0 ) {
184  if ( ispunct( *note ) ) {
185  start = *note;
186  end = note[len - 1];
187  if ( ( start == end )
188  || ( ( start == '(' ) && ( end == ')' ) )
189  || ( ( start == '<' ) && ( end == '>' ) )
190  || ( ( start == '{' ) && ( end == '}' ) )
191  || ( ( start == '[' ) && ( end == ']' ) ) ) {
192  note[len - 1] = '\0';
193  *note = '\0';
194  note++;
195  }
196  }
197  }
198  }
199  return ( note );
200 }
201 
202 
203 /* parse a single line from either a file or character table
204  Strip trailing <cr>; return 0 if empty */
205 static int
206 get_event_line( char **place, FILE * table, char **tmp_perfmon_events_table )
207 {
208  int ret = 0;
209  int i;
210  char *line = place[0];
211  int c = 0;
212 
213  if ( table ) {
214  if ( fgets( place[0], USER_EVENT_OPERATION_LEN, table ) ) {
215 
216  i = strlen( place[0] );
217  c = place[0][i-1];
218  /* throw away the rest of the line. */
219  while ( c != '\n' && c != EOF )
220  c = fgetc( table );
221 
222  ret = i;
223  line = place[0];
224 
225  for ( i = 0; i < (int)strlen( place[0] ); i++ )
226  if ( place[0][i] == '\n' )
227  place[0][i] = 0;
228  } else
229  ret = 0;
230  } else {
231  for ( i = 0;
232  **tmp_perfmon_events_table && **tmp_perfmon_events_table != '\n' &&
234  i++ ) {
235  line[i] = **tmp_perfmon_events_table;
236  ( *tmp_perfmon_events_table )++;
237  }
238  if ( **tmp_perfmon_events_table == '\n' ) {
239  ( *tmp_perfmon_events_table )++;
240  }
241  line[i] = '\0';
242  ret = **tmp_perfmon_events_table;
243  }
244  return ( ret );
245 }
246 
247 int add_define( char *line, list_t* LIST ) {
248  char *t;
249  char local_line[USER_EVENT_OPERATION_LEN+1];
250  list_t *temp;
251 
252  strncpy( local_line, line, USER_EVENT_OPERATION_LEN );
253  local_line[USER_EVENT_OPERATION_LEN] = '\0';
254 
255  temp = (list_t*)papi_malloc(sizeof(list_t));
256 
257  if ( NULL == temp ) {
258  PAPIERROR("outof memory" );
259  return PAPI_ENOMEM;
260  }
261 
262  strtok(local_line, " "); /* throw out the #define */
263 
264  /* next token should be the name */
265  t = strtok(NULL, " ");
266  strncpy( temp->name, t, PAPI_MIN_STR_LEN-1);
267  temp->name[PAPI_MIN_STR_LEN-1] = '\0';
268 
269  /* next token should be the value */
270  t = strtok(NULL," ");
271  t[strlen(t)] = '\0';
272  strncpy( temp->value, t, PAPI_MIN_STR_LEN-1);
273  temp->value[PAPI_MIN_STR_LEN-1] = '\0';
274 
275  temp->next = LIST->next;
276  LIST->next = temp;
277 
278  return PAPI_OK;
279 }
280 
281 int renumber_ops_string(char *dest, char *src, int start) {
282  char *saveptr, *subtoken;
283  char *pass;
284  char temp[PAPI_MIN_STR_LEN];
285  char orig[PAPI_MIN_STR_LEN];
286 
287  memcpy(orig, src, PAPI_MIN_STR_LEN);
288  pass = orig;
289 
290  while ( (subtoken = strtok_r( pass, "|", &saveptr)) != NULL ) {
291  pass = NULL;
292  if ( subtoken[0] == 'N' ) {
293  sprintf(temp, "N%d|", start++);
294  strcat(dest, temp);
295  } else {
296  strcat(dest, subtoken);
297  strcat(dest, "|");
298  }
299  }
300  return start;
301 }
302 
303 int is_define(char *t, list_t *next, char *ops) {
304  int found = 0;
305  char temp[PAPI_MIN_STR_LEN];
306  int len = 0;
307 
308  /* check if its a predefined constant */
309  while( next != (void*) NULL ) {
310  if ( ! strcmp(t, next->name) ) {
311  sprintf(temp,"%s|", next->value);
312  len = strlen(ops) + strlen(temp);
313  if ( len >= USER_EVENT_OPERATION_LEN ) {
314  fprintf(stderr,"outa room");
315  return -1;
316  }
317 
318  strcat(ops,temp);
319  found = 1;
320  break;
321  }
322  next = next->next;
323  }
324  return (found);
325 }
326 
327 int
328 check_native_events(char *target, user_defined_event_t* ue, int* msi)
329 {
330  char temp[PAPI_MIN_STR_LEN];
331  int found = 0;
332  int ret;
333  int magic_string_int = *msi;
334  int len = 0;
335 
336  if ( ( ret = _papi_hwi_native_name_to_code( target, &ue->events[ue->count] ) ) == PAPI_OK ) {
337  if ( ue->events[ue->count] == 0 ) {
338  INTDBG( "Event %s not found!\n", target);
339  } else {
340  found = 1;
341  sprintf(temp, "N%d|", magic_string_int++);
342  len = strlen(ue->operation) + strlen(temp);
343  ue->count++;
344 #ifdef SHOW_LOADS
345  INTDBG("\tFound a native event %s\n", target);
346 #endif
347  if ( len >= USER_EVENT_OPERATION_LEN ) {
348  fprintf(stderr,"outa room");
349  return -1;
350  }
351  strcat(ue->operation, temp);
352  *msi = magic_string_int;
353  }
354  }
355 
356  return found;
357 }
358 
359 int
360 check_preset_events (char *target, user_defined_event_t* ue, int* msi)
361 {
362  char op;
363  int j = 0;
364  int k;
365  int found = 0;
366  int magic_string_int = *msi;
367 
368  char temp[PAPI_MIN_STR_LEN];
369 
370  /* XXX make sure that we don't overflow the ue->operation buffer */
371  int length = PAPI_MIN_STR_LEN;
372 
373  memset(temp, 0, PAPI_MIN_STR_LEN);
374  for ( j = 0; ( j < PAPI_MAX_PRESET_EVENTS) && (_papi_hwi_presets[j].symbol != NULL ); j++ ) {
375  if ( strcasecmp( target, _papi_hwi_presets[j].symbol ) == 0) {
376 #ifdef SHOW_LOADS
377  INTDBG("\tFound a match for preset event %s\n", _papi_hwi_presets[j].symbol);
378 #endif
379  /* Check that the preset event we're trying to add is actually available on this system */
380  if ( _papi_hwi_presets[j].count == 0 ) {
381  PAPIERROR("NEXTLINE:\t%s is not available on this platform. Skipping event %s\n",
382  target, ue->symbol);
383  /* clean up this and ditch this whole line */
384  memset(ue, 0, sizeof(user_defined_event_t));
385  return -1;
386  }
387 
388  length = strlen(ue->operation);
389 
390  /* Deal with singleton events */
391  if (!_papi_hwi_presets[j].derived_int) {
392  sprintf(temp, "N%d|", magic_string_int++);
393  length = strlen(ue->operation) + strlen(temp);
394  if ( length >= USER_EVENT_OPERATION_LEN ) {
395  fprintf(stderr,"Out of room, the user defined event %s is too large!\n", ue->symbol );
396  return -1;
397  }
398  strcat(ue->operation, temp);
399  ue->events[ue->count++] = _papi_hwi_presets[j].code[0];
400  } else {
401  switch ( _papi_hwi_presets[j].derived_int ) {
402  case DERIVED_ADD:
403  case DERIVED_ADD_PS:
404  case DERIVED_SUB:
405  if (_papi_hwi_presets[j].derived_int == DERIVED_SUB) {
406  op = '-';
407  } else {
408  op = '+';
409  }
410  for ( k = 0; k < (int) _papi_hwi_presets[j].count; k++) {
411  ue->events[ue->count++] = _papi_hwi_presets[j].code[k];
412  if (k%2)
413  sprintf(temp, "N%d|%c|", magic_string_int++, op);
414  else
415  sprintf(temp, "N%d|", magic_string_int++);
416 
417  length = strlen(ue->operation) + strlen(temp);
418  if ( USER_EVENT_OPERATION_LEN <= length ) {
419  PAPIERROR("The user defined event %s has to may operands in its definition.\n", ue->symbol );
420  return -1;
421  }
422  strcat(ue->operation, temp);
423  }
424  break;
425 
426  case DERIVED_POSTFIX:
427  for ( k = 0; k < (int)_papi_hwi_presets[j].count; k++ ) {
428  ue->events[ue->count++] = _papi_hwi_presets[j].code[k];
429  }
430  /* so we need to go through the ops string and renumber the N's
431  as we place it in our ue ops string */
432  magic_string_int = renumber_ops_string(temp,
433  _papi_hwi_presets[j].postfix, magic_string_int);
434  length = strlen( temp ) + strlen( ue->operation );
435  if ( length >= USER_EVENT_OPERATION_LEN ) {
436  PAPIERROR( "User Event %s's expression is too long.", ue->symbol );
437  return -1;
438  }
439  strcat(ue->operation, temp);
440  default:
441  break;
442  } /* /switch */
443  } /* /derived */
444  found = 1;
445  break;
446  } /* /symbol match */
447 
448  } /* end while(preset events) */
449 
450  *msi = magic_string_int;
451  return found;
452 }
453 
454 int
455 check_user_events(char *target, user_defined_event_t* ue, int* msi, user_defined_event_t* search, int search_size)
456 {
457  char temp[PAPI_MIN_STR_LEN];
458  int j = 0;
459  int k = 0;
460  int found = 0;
461  int magic_string_int = *msi;
462  int len = 0;
463 
464  memset(temp, 0, PAPI_MIN_STR_LEN);
465  for (j=0; j < search_size; j++) {
466  if ( strcasecmp( target, search[j].symbol) == 0 ) {
467 #ifdef SHOW_LOADS
468  INTDBG("\tFount a match for user event %s at search[%d]\n", search[j].symbol, j );
469 #endif
470 
471  for ( k = 0; k < (int)search[j].count; k++ ) {
472  ue->events[ue->count++] = search[j].events[k];
473  }
474 
475  /* so we need to go through the ops string and renumber the N's
476  as we place it in our ue ops string */
477  magic_string_int = renumber_ops_string(temp,
478  search[j].operation, magic_string_int);
479 
480  len = strlen( temp ) + strlen( ue->operation );
481  if ( len >= USER_EVENT_OPERATION_LEN ) {
482  PAPIERROR( "User Event %s is trying to use an invalid expression, its too long.", ue->symbol );
483  return -1;
484  }
485  strcat(ue->operation, temp);
486  found = 1;
487  }
488  }
489 
490  *msi = magic_string_int;
491  return found;
492 }
493 
494 /*
495  * name, expr (events to lookup later)...
496  *
497  * Do we keep rpn? Probably...
498  * but DATA_CACHE_MISSES|INSTRUCTION_CACHE_MISSES|+ is servicable...
499  *
500  * Do we keep the csv format?
501  * N0|N1|+|n2|* == (n0+n1)*n2 ??
502  * if not, we do have to still create the string
503  * so that add_events can parse it...
504  *
505  * Ok, how do we denote where the event lives (and if there are more than one, what do we do)
506  * COMP_NAME:EVENT_NAME ?
507  * COMP_NAME:SUB_OPT:EVENT_NAME ?
508  * CPU:0:L3_CACHE_FILLS ?
509  */
510 
511 static int
512 load_user_event_table( char *file_name)
513 {
514  char *line;
515  char temp[PAPI_MIN_STR_LEN];
516  char *t;
517  char **ptr = NULL;
518  int insert = 0;
519  int size = 0;
520  int tokens = 0;
521  int found = 0;
522  int oops;
523  int len = 0;
524  int magic_string_int;
525  FILE* table = NULL;
527 
528 
529  if ( file_name == NULL ) {
530 #ifndef STATIC_USER_EVENTS
531  PAPIERROR( "Cowardly refusing to load events file NULL\n" );
532  return ( PAPI_EBUG );
533 #else
534  /* Only parse the static events once! */
535  if ( !first_time ) {
536  PAPIERROR("Cowardly refusing to load events file NULL\n" );
537  return ( PAPI_EBUG );
538  }
539 
540  INTDBG("Loading events from papi_static_user_events.h\n");
541  ptr = &user_events_table;
542  table = NULL;
543 
544 #endif
545  } else {
546  table = fopen(file_name, "r");
547 
548  if ( !table ) {
549  PAPIERROR( "The user events file '%s' does not exist; bailing!", file_name );
550  return ( PAPI_EBUG );
551  }
552 
553  }
554 
555  line = (char*) papi_malloc( USER_EVENT_OPERATION_LEN + 1 );
556  /* Main parse loop */
557  while (get_event_line(&line, table, ptr) > 0 ) {
558  magic_string_int = 0;
559  len = 0;
560 
561  t = trim_string( strtok(line, ","));
562  if ( (t==NULL) || (strlen(t) == 0) )
563  continue;
564 
566  memset( foo, 0x0, sizeof(user_defined_event_t) );
567 
568  /* Deal with comments and constants */
569  if (t[0] == '#') {
570  if ( 0 == strncmp("define",t+1,6) ) {
571  papi_free(foo);
572  if ( PAPI_OK != (oops = add_define( t , &defines ) ) ) {
573  papi_free(line);
574  if (table)
575  fclose(table);
576  return oops;
577  }
578  continue;
579  }
580  goto nextline;
581  }
582 
583  // the entire structure was zeroed so if we only copy one less that what fits in the 'symbol' buffer, it will insure that this buffer is NULL terminated
584  strncpy(foo->symbol, t, PAPI_MIN_STR_LEN-1);
585 #ifdef SHOW_LOADS
586  INTDBG("Found a user event named %s\n", foo->symbol );
587 #endif
588  /* This segment handles the postfix operation string
589  * converting it from OPERAND1|OPERAND2|+
590  * to the papi internal N1|N2|+ : OPERAND1:OPERAND2
591  * with some basic sanity checking of the operands */
592 
593  do {
594  memset(temp, 0, sizeof(temp));
595  found = 0;
596  t = trim_string(strtok(NULL, "|"));
597  if ( (t==NULL) || (strlen(t) == 0) )
598  break;
599 
600  if ( is_operation(t) ) {
601 #ifdef SHOW_LOADS
602  INTDBG("\tFound operation %c\n", t[0]);
603 #endif
604  sprintf(temp, "%c|", t[0]);
605  len = strlen(foo->operation) + strlen(temp);
606  if ( len >= USER_EVENT_OPERATION_LEN ) {
607  PAPIERROR("User Event %s's expression is too long.", foo->symbol );
608  goto nextline;
609  }
610  strcat(foo->operation, temp);
611  tokens--;
612  } else if ( isdigit(t[0]) ) {
613  /* its a number, the read time parser handlers those */
614  sprintf(temp,"%s|", t);
615  len = strlen( foo->operation ) + strlen( temp );
616  if ( len >= USER_EVENT_OPERATION_LEN ) {
617  PAPIERROR("Invalid event specification %s's expression is too long.", foo->symbol);
618  goto nextline;
619  }
620  strcat(foo->operation, temp);
621  tokens++;
622 #ifdef SHOW_LOADS
623  INTDBG("\tFound number %s\n", t);
624 #endif
625  } else if (is_define(t, defines.next, foo->operation)) {
626  tokens++;
627 #ifdef SHOW_LOADS
628  INTDBG("\tFound a predefined thing %s\n", t);
629 #endif
630  } else {
631  /* check if its a native event */
632  if ( check_native_events(t, foo, &magic_string_int) ) {
633  found = 1;
634  }
635 
636  /* so its not a native event, is it a preset? */
637  if ( !found ) {
638  found = check_preset_events(t, foo, &magic_string_int);
639  } /* end preset check */
640 
641  /* its not native nor preset is it a UE that we've already seen? */
642  /* look through _papi_user_events */
643  if ( !found ) {
644  found = check_user_events(t, foo, &magic_string_int,
645  _papi_user_events, _papi_user_events_count);
646  }
647 
648  /* and the current array of parsed events from this file */
649  if ( !found ) {
650  if (insert > 0)
651  found = check_user_events(t, foo, &magic_string_int, foo, insert);
652  }
653 
654  if ( !found ) {
655  INTDBG("HELP!!! UNABLE TO FIND SYMBOL %s\n", t);
656  PAPIERROR("NEXTLIN:\tSymbol lookup failure, I have no clue what %s is, perhaps you have a bad ops string?\n", t);
657  goto nextline;
658  } else {
659  tokens++;
660  }
661  } /* END native, preset, user defined event lookups */
662 
663  } while( (int)foo->count < _papi_hwd[0]->cmp_info.num_mpx_cntrs );
664 
665  if ( _papi_hwd[0]->cmp_info.num_mpx_cntrs - (int)foo->count < tokens ) {
666  INTDBG("Event %s is attempting to use too many terms in its expression.\n", foo->symbol );
667  goto nextline;
668  }
669 
670  /* refine what we mean here, if we exaust the number of counters, do we still allow constants */
671  while ( tokens > 1 ) {
672  t = trim_string(strtok(NULL, "|"));
673  if ( t == NULL ) {
674  INTDBG("INVALID event specification (%s)\n", foo->symbol);
675  goto nextline;
676  }
677  if ( is_operation(t) ) {
678  sprintf(temp,"%c|", t[0]);
679  /* TODO */
680  len = strlen(temp) + strlen(foo->operation);
681  if ( len >= USER_EVENT_OPERATION_LEN ) {
682  PAPIERROR("User Event %s contains too many operations.", foo->symbol );
683  goto nextline;
684  }
685  strcat(foo->operation, temp);
686  tokens--;
687  } else {
688  PAPIERROR("INVALID event specification, %s is attempting to use too many events\n", foo->symbol);
689  goto nextline;
690  }
691  }
692 
693  append_to_global_list( foo );
694 #ifdef SHOW_LOADS
695  PRINT_UE(foo);
696 #endif
697 
698  insert++;
699  size++;
700 nextline:
701  tokens = 0;
702  papi_free(foo);
703  } /* End main parse loop */
704  if (table)
705  fclose(table);
706 
707  papi_free(line);
708  return insert;
709 }
710 
711 int
713 {
714  int retval;
715 
716  if ( first_time ) {
718  defines.next = NULL;
719  }
720 
721  retval = load_user_event_table( name );
722 
723  if (retval < 0)
724  return( retval );
725 
726  first_time = 0;
727  return( PAPI_OK );
728 }
729 
sprintf(splash[splash_line++],"\tIozone: Performance Test of File I/O\n")
static int load_user_event_table(char *file_name)
memset(eventId, 0, size)
char value[PAPI_MIN_STR_LEN]
list_t defines
#define DERIVED_SUB
Definition: papi_internal.h:74
unsigned long long length
Definition: iozone.c:17106
#define papi_free(a)
Definition: papi_memory.h:35
start
Definition: iozone.c:22736
#define papi_malloc(a)
Definition: papi_memory.h:34
int check_preset_events(char *target, user_defined_event_t *ue, int *msi)
static char * trim_string(char *in)
#define PAPI_MAX_PRESET_EVENTS
int _papi_user_defined_events_setup(char *name)
int events[PAPI_EVENTS_IN_DERIVED_EVENT]
#define PAPI_EBUG
Definition: papi.h:257
return PAPI_OK
Definition: linux-nvml.c:458
int count
Definition: iozone.c:22422
void append_to_global_list(user_defined_event_t *more)
#define DERIVED_ADD
Definition: papi_internal.h:70
fclose(thread_wqfd)
char name[PAPI_MIN_STR_LEN]
static int get_event_line(char **place, FILE *table, char **tmp_perfmon_events_table)
void
Definition: iozone.c:18627
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
double c
Definition: multiplex.c:22
void double value
Definition: iozone.c:18781
int _papi_hwi_native_name_to_code(char *in, int *out)
papi_vector_t * _papi_hwd[]
static double a[MATRIX_SIZE][MATRIX_SIZE]
Definition: rapl_basic.c:37
Return codes and api definitions.
#define INTDBG(format, args...)
Definition: papi_debug.h:65
void PRINT_UE(user_defined_event_t *ue)
long long ret
Definition: iozone.c:1346
int renumber_ops_string(char *dest, char *src, int start)
t
Definition: iozone.c:23562
unsigned int PAPI_NATIVE_UMASK_SHIFT
void _papi_cleanup_user_events()
int i
Definition: fileop.c:140
static char * trim_note(char *in)
long long found
Definition: libasync.c:735
char *long long size
Definition: iozone.c:12023
free(dummyfile[xx])
#define USER_EVENT_OPERATION_LEN
int k
Definition: iozone.c:19136
hwi_presets_t _papi_hwi_presets[PAPI_MAX_PRESET_EVENTS]
int first_time
pthread_attr_t foo
Definition: iozone.c:18592
int is_define(char *t, list_t *next, char *ops)
int check_native_events(char *target, user_defined_event_t *ue, int *msi)
int is_operation(char *op)
int add_define(char *line, list_t *LIST)
char symbol[PAPI_MIN_STR_LEN]
void PAPIERROR(char *format,...)
strcat(command, mountname)
#define PAPI_ENOMEM
Definition: papi.h:252
nsize_list next
Definition: iozone.c:20053
static double b[MATRIX_SIZE][MATRIX_SIZE]
Definition: rapl_basic.c:38
int tokens
Definition: iozone.c:19606
struct def_list * next
char operation[USER_EVENT_OPERATION_LEN]
char * name
Definition: iozone.c:23648
int
Definition: iozone.c:18528
#define PAPI_MIN_STR_LEN
Definition: papi.h:462
int temp
Definition: iozone.c:22158
unsigned int code[PAPI_MAX_INFO_TERMS]
Definition: papi_preset.h:32
user_defined_event_t * _papi_user_events
unsigned int PAPI_NATIVE_EVENT_SHIFT
int check_user_events(char *target, user_defined_event_t *ue, int *msi, user_defined_event_t *search, int search_size)
#define DERIVED_ADD_PS
Definition: papi_internal.h:72
long j
Definition: iozone.c:19135
ssize_t retval
Definition: libasync.c:338
unsigned int _papi_user_events_count
#define DERIVED_POSTFIX
Definition: papi_internal.h:75
int int op
Definition: iozone.c:19389
char * ptr
Definition: iozone.c:23586