Techniques for preparing a binary file for future instrumentation are
provided. First object code and second object code are linked into a
binary file. The first object code is created by compiling the source
code of a computer program. The second object code comprises a first set
of instrumentation code that is not referenced by any instructions in the
object code of the computer program. The second object code stores
commonly used instrumentation routines that are referenced by a second
set of instrumentation code, which second set is inserted in the binary
file when the binary file is subsequently instrumented.