摘要 |
<p>Embodiments of the present invention provide a dynamic instrumentation system that uses statically defined probes. The probes may be defined using macro definitions. One or more libraries of macro definitions that are linked to static probes are provided in the computer system. Each probe is uniquely identified by a name having a well-defined prefix and a structured format. Probes may then be inserted at various locations and into the target software using standard macro calls. When the target software is compiled, the macro calls of each probe are expanded to calls to an existing function known as a probe handler function. Each probe handler function is identified in the computer system's symbol table with a unique symbol that corresponds to the name specified by the macro definition. When a probe is activated, the operating system kernel transfers control to an instrumentation kernel object. The instrumentation kernel object locates and runs the probe handler function to perform the actions requested for that probe.</p> |