Patent ID: 8739135

Claim:
A method of linking a probe script to a probe, said method comprising: converting, by a processor, the probe script into a probe handler function that comprises program code statements in view of a name of the probe; and linking the probe handler function to a global function pointer of the probe, wherein the probe is generated from a source code of a program by: inserting, into the source code of the program, a macro definition that designates the name for the probe, wherein the name is associated with the global function pointer and encodes a list of actions to be performed by the probe, wherein the macro definition comprises a conditional indirect function call for the probe through the global function pointer; inserting, into the source code at selected locations, a respective static marker function defined according to the macro definition; and compiling, by the processor, the source code of the program comprising the respective static marker function into an object code, wherein the object code comprises a respective probe for the respective static marker function; and marking a predicate of the probe with a low branch probability attribute; and translating the name of the probe to a generated function name used in the probe handler function, wherein the generated function name is globally unique, wherein a call to the macro definition specifies a parameter list to be passed to the probe.