a method and system for instrumentation are provided along with a method for instrumentation preparation . the method for instrumentation preparation may comprise obtaining address data of an original instruction in an original instruction stream , obtaining kernel mode data comprising a kernel breakpoint handler , obtaining user mode data comprising a user breakpoint handler , allocating a page of a process address space , creating a trampoline , associating the trampoline with a breakpoint instruction , and replacing the original instruction with the breakpoint instruction . the method for instrumentation may comprise detecting the breakpoint instruction , calling the kernel breakpoint handler , modifying an instruction pointer via the kernel breakpoint handler such that the instruction pointer points to the trampoline , and executing the trampoline . the system for instrumentation may comprise a breakpoint setup module and a breakpoint execution module for respectively setting up and completing instrumentation involving the trampoline .