global serial
global startTime
global finalTime


function callFunction(probefunc, tid) {
	if (startTime == 0) {
		startTime = gettimeofday_ns()
		printf("<%s,,%d,,%d,,%d\n", probefunc, serial, startTime, tid)
	} else
	    printf("<%s,,%d,,%d,,%d\n", probefunc, serial, gettimeofday_ns(), tid)
	serial++
}

function returnFunction(probefunc, tid) {
	finalTime = gettimeofday_ns()
	printf(">%s,,%d,,%d\n", probefunc, finalTime, tid)
}


probe end {
	printf("-%d\n",finalTime);
	printf("+%d\n",finalTime - startTime);
    exit()
}

probe process(@1).end {
finalTime = gettimeofday_ns()
}