Exemple #1
0
int handleDefcountergroup( void* firsthandlerarg, uint32_t streamid,
		uint32_t deftoken, const char* name ) {


	return ( 0 == VTF3_WriteDefsampclass( ((fcbT*) firsthandlerarg)->fcb, deftoken,
		name ) )
		? OTF_RETURN_ABORT : OTF_RETURN_OK;
}
Exemple #2
0
static void conv_write_metrics() {
  int i, j = 0;

  if ( maxmet != -1 ) {
    metids = x_malloc((maxmet+1) * sizeof(int));
    metvts = x_malloc((maxmet+1) * sizeof(int));

    wbytes += VTF3_WriteDefsampclass(fcb, 0, "HW Counters");

    for (i=0; i<nummet; i++) {
      if ( mettab[i].name ) {
        metids[j] = i;
        metvts[j++] = type2vtf[mettab[i].type];
        wbytes += VTF3_WriteDefsamp(fcb, i, 0, 1, samplegroup,
              type2vtf[mettab[i].type],
              (mettab[i].type == ELG_INTEGER ? (void*)&intlim : (void*)&fltlim),
              (mettab[i].iv == ELG_START), VTF3_DATAREPHINT_BEFORE,
              mettab[i].name, (mettab[i].iv == ELG_START ? "#/s" : ""));
      }
    }
  }
}