Beispiel #1
0
int handleDefTimerResolution( void* fcbx,
	uint32_t streamid, uint64_t ticksPerSecond ) {
	
	
	fcbT *fcb;
	streaminfoT* si;
	

	if( 0 != streamid ) {

		fprintf( stderr, "ERROR: cannot merge traces with local definitions. aborting\n" );

		assert( 0 );
		
		return OTF_RETURN_ABORT;

	} else {


		fcb = ((fcbT*) fcbx);
		si = hash_search( fcb->hash, streamid );

		si->ticksPerSecond = ticksPerSecond;
	
		return ( 0 == OTF_Writer_writeDefTimerResolution( fcb->writer, streamid,
			ticksPerSecond ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK;
			
	}
}
Beispiel #2
0
int handleDefclkperiod( void *fcb, double clkperiod ) {


	/* ' + 0.5' makes proper rounding */

	OTF_Writer_writeDefTimerResolution( ((fcbT*)fcb)->writer, 0, 
		(uint64_t) ( 1.0 / clkperiod + 0.5 ) );

	return 0;
}
Beispiel #3
0
int handleDefTimerResolution (void *userData, uint32_t stream, uint64_t ticksPerSecond) {

    return ( 0 == OTF_Writer_writeDefTimerResolution ( (OTF_Writer*) userData, stream, ticksPerSecond) )
           ? OTF_RETURN_ABORT : OTF_RETURN_OK;
}