add the instrumentation of function counter