Instrumentation A technique that inserts code into a program to collect run- time information Program analysis:performance profiling,error detection,capture replay Architectural study:processor and cache simulation,trace collection Source-Code Instrumentation Static Binary Instrumentation Dynamic Binary Instrumentation Instrumentcode just before itruns (Just In Time-JIT) No need to recompile or re-link Discover code at runtime Handle dynamically-generated code-Attach to running processes 4Instrumentation • A technique that inserts code into a program to collect runtime information ➢ Program analysis : performance profiling, error detection, capture & replay ➢ Architectural study : processor and cache simulation, trace collection • Source-Code Instrumentation • Static Binary Instrumentation • Dynamic Binary Instrumentation ➢ Instrument code just before it runs ( Just In Time - JIT) ✓ No need to recompile or re-link ✓ Discover code at runtime ✓ Handle dynamically-generated code -Attach to running processes 4