Combining compile-time and run-time instrumentation for testing tools