Real-time software diagnostic tracing
First Claim
1. A method for instrumenting software comprising the steps of:
- passing one or more arguments to a macro in an instrumentation line that invokes the macro; and
determining whether or not the instrumentation line is compiled to form a corresponding instance of instrumentation code, at least partly based on at least one of the one or more arguments, wherein the one or more arguments specify at least two dimensions; and
the method further comprises the step of determining at run-time whether or not the instance of instrumentation code is enabled for recording diagnostic information to a log, at least partly based on the at least two dimensions, wherein no function call overhead is incurred if disabled.
5 Assignments
0 Petitions
Accused Products
Abstract
Techniques for tracing the real-time operation of software for the purposes of testing, debugging, or performance analysis are disclosed. Diagnostic instrumentation for generating records containing details of software operation is incorporated in the software by inserting calls to diverse macros or inline functions. Each macro takes an argument specifying both a subsystem and a category of instrumentation within the subsystem. Based on the specified subsystem and category, the instrumentation can be included or excluded from the compiled object code and, if included, can be dynamically enabled at run-time. Disabled instrumentation does not result in a function call, but only a single, inline “if,” thereby reducing overhead. One macro accepts both software parameters and a custom format specifier describing how the parameters should be displayed. However, the parameters are not formatted during logging, nor is the format specifier included in the record. Instead, the formatting is performed when displayed.
39 Citations
19 Claims
-
1. A method for instrumenting software comprising the steps of:
-
passing one or more arguments to a macro in an instrumentation line that invokes the macro; and determining whether or not the instrumentation line is compiled to form a corresponding instance of instrumentation code, at least partly based on at least one of the one or more arguments, wherein the one or more arguments specify at least two dimensions; and
the method further comprises the step of determining at run-time whether or not the instance of instrumentation code is enabled for recording diagnostic information to a log, at least partly based on the at least two dimensions, wherein no function call overhead is incurred if disabled. - View Dependent Claims (2, 3, 4)
-
-
5. A method for diagnosing software comprising the steps of:
-
passing one or more arguments to a macro in an instrumentation line that does nothing other than invoke the macro, wherein the one or more arguments specify at least two dimensions; compiling the instrumentation line to form a corresponding instance of instrumentation code; and determining at run-time whether or not the instance of instrumentation code is enabled for recording diagnostic information to a log, at least partly based on the at least two dimensions, wherein no function call overhead is incurred if disabled. - View Dependent Claims (6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A software diagnostic method comprising the steps of:
-
specifying at least one format specifier in an instrumentation line configured to record software diagnostic information into a log, wherein; the format specifier is configured for formatting the diagnostic information; and the formatting performed by the format specifier is defined in the instrumentation line; recording the diagnostic information to the log without formatting the diagnostic information according to the format specifier; recording to the log, along with the diagnostic information, at least one identifier for ascertaining the format specifier at a later time; communicating the diagnostic information from the log for user examination; and concurrently with or subsequent to said step of communicating the diagnostic information, formatting the diagnostic information according to the format specifier as ascertained from the at least one identifier. - View Dependent Claims (18, 19)
-
Specification