A method of instrumenting a compiled software program, having a plurality of locations and an operating state when executed, comprising the steps of: disassembling at least a portion of a binary file associated to the software program; identifying a location at which a probe function is to be inserted in the binary file, including identifying an instruction in the disassembled portion of the binary file that is in a function to be instrumented within the software program and that causes an instruction at a target location to execute; replacing in the binary file the identified instruction with an instruction that causes a wrapper function (220, 260, 320, 360) to execute, the wrapper function comprising at least one computer-executable instruction (226, 262, 326, 366) that causes the probe function to execute; and including within the wrapper function an instruction that causes the identified instruction at the target location to execute; wherein the binary file is being executed on a platform which has specific calling conventions, where a stack pointer is set to point to the bottom of a stack frame and wherein a new stack frame is created dynamically upon each call to a given function to allocate storage for the given function, and wherein the specific calling conventions of the platform are preserved by: the wrapper function including a prologue (222; 264, 322, 362) which preserves the operating state of the platform and sets the stack pointer to indicate the bottom of the stack frame allocated for the wrapper function, the wrapper function further including an epilogue (224, 266, 324, 364) that restores the operating state of the platform and de-allocates the stack frame allocated for the wrapper function, the wrapper function handling the execution of the probe function between the prologue and the epilogue, and the method further comprising updating (422, 442, 452) a function table of the platform to represent the added functions, namely the probe and wrapper functions. disassembling at least a portion of a binary file associated to the software program; identifying a location at which a probe function is to be inserted in the binary file, including identifying an instruction in the disassembled portion of the binary file that is in a function to be instrumented within the software program and that causes an instruction at a target location to execute; replacing in the binary file the identified instruction with an instruction that causes a wrapper function (220, 260, 320, 360) to execute, the wrapper function comprising at least one computer-executable instruction (226, 262, 326, 366) that causes the probe function to execute; and including within the wrapper function an instruction that causes the identified instruction at the target location to execute; wherein the binary file is being executed on a platform which has specific calling conventions, where a stack pointer is set to point to the bottom of a stack frame and wherein a new stack frame is created dynamically upon each call to a given function to allocate storage for the given function, and wherein the specific calling conventions of the platform are preserved by: the wrapper function including a prologue (222; 264, 322, 362) which preserves the operating state of the platform and sets the stack pointer to indicate the bottom of the stack frame allocated for the wrapper function, the wrapper function further including an epilogue (224, 266, 324, 364) that restores the operating state of the platform and de-allocates the stack frame allocated for the wrapper function, the wrapper function handling the execution of the probe function between the prologue and the epilogue, and the method further comprising updating (422, 442, 452) a function table of the platform to represent the added functions, namely the probe and wrapper functions. the wrapper function including a prologue (222; 264, 322, 362) which preserves the operating state of the platform and sets the stack pointer to indicate the bottom of the stack frame allocated for the wrapper function, the wrapper function further including an epilogue (224, 266, 324, 364) that restores the operating state of the platform and de-allocates the stack frame allocated for the wrapper function, the wrapper function handling the execution of the probe function between the prologue and the epilogue, and the method further comprising updating (422, 442, 452) a function table of the platform to represent the added functions, namely the probe and wrapper functions.