Patent ID: 7805717

Claim:
A computer system comprising: a processing system comprising a compiler and a profiler; a non-volatile storage device configured to store program instructions including first program instructions; and an instrumentation cache on the non-volatile storage device, wherein the instrumentation cache is configured to store instrumented versions of instructions included in the first program instructions in an uncompiled state; wherein the compiler is configured to notify the profiler of a compilation event corresponding to the first program instructions; wherein the profiler is configured to: detect the event and intercept compilation first instructions of the first program instructions; determine whether an instrumented version of the first instructions is currently available on the non-volatile storage device; in response to determining the instrumented version of the first instructions is available, instruct the compiler to compile the instrumented version of the first instructions; and in response to determining the instrumented version is not available: retrieve and instrument the first instructions; store the instrumented first instructions in the instrumentation cache in an uncompiled state; and provide the instrumented first instructions to the compiler for compilation; wherein in response to receiving the instrumented first instructions provided by the profiler, the compiler is configured to compile the instrumented first instructions.