automatic method instrumentation