Add function instrumentation