A method to instrument software code may comprise marking one or more
blocks of code in an application program to provide a marked code. The
marking may comprise inserting a marker at each of the one or more blocks
according to a marking application programming interface (API). The one
or more of the blocks of code marked according to the marking API may be
transformed so that one or more functions are performed for the marked
blocks. The one or more functions may not be part of the application
program. The method may include executing the application program and
performing the one or more functions for the marked blocks.