Exemplo n.º 1
0
int handleCounter( void* firsthandlerarg, uint64_t time, uint32_t process,
		uint32_t token, uint64_t value ) {


	int sampletokenarray= token;
	int samplevaluetypearray= VTF3_VALUETYPE_UINT;
	uint64_t samplevaluearray= value;

	nodeT *node = treehash_searchnode( ((fcbT*) firsthandlerarg)->p_hashtab, process );

	if ( NULL == node ) {

		fprintf( stderr, "otf2vtf WARNING: undefined process %u, record ignored\n",
			process );
			
		return 0;
	}

	FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg );
	

	return ( 0 == VTF3_WriteSamp( ((fcbT*) firsthandlerarg)->fcb, time,
		node->processi, 1, &sampletokenarray, &samplevaluetypearray, &samplevaluearray ) )
		? OTF_RETURN_ABORT : OTF_RETURN_OK;
}
Exemplo n.º 2
0
static void genWriteCOUNTER(elg_ui4 lid, elg_d8 time,
       elg_ui1 metc, elg_ui8 metv[]) {
  if ( metc ) {
    wbytes += VTF3_WriteSamp(fcb, time*1.0e+10, lid,
                             metc, metids, metvts, metv);
  }
  lasttime = time;
}