System and method for conditional tracing of computer programs
First Claim
1. A method of tracing the execution of a computer program comprising:
- generating trace control information which specifies triggers and associated actions;
attaching a client-side trace library to a memory image of a program, wherein attaching to the memory image comprises replacing, based on the trace control information, one or more original instructions of the memory image with debugging instructions, thereby causing the debugging instructions to be executed where the original instructions would have been executed;
maintaining the one or more original instructions in a separate data structure, thereby enabling the functionality of the application to be preserved;
tracing execution of the computer program according to the trace control information, wherein tracing execution of the computer program comprises executing a first instrumented instruction associated with a first trigger, the first trigger being associated in the trace control information with a first condition, and further comprises branching to the client-side trace library to perform an action associated with the first instrumented instruction in the trace control information; and
generating a trace log of said tracing, wherein the trace log reflects said actions performed during tracing;
wherein performing the action associated with the first instrumented instruction comprises modifying a tracing action associated with a second instrumented instruction based upon determining that the first trigger has occurred, and further based upon determining that a condition associated with the first trigger is satisfied.
4 Assignments
0 Petitions
Accused Products
Abstract
A software system is disclosed which facilitates the process of tracing the execution paths of a program, called the client. The tracing is performed without requiring modifications to the executable or source code files of the client. Trace data collected during the tracing operation is collected according to instructions in a trace options file. At run time, the tracing library attaches to the memory image of the client. The tracing library is configured to monitor execution of the client and to collect trace data, based on selections in the trace options file. Conditional tracing, through the use of triggers and actions taken in response to the triggers, allows the developer to control the tracing operation. The triggers can be conditional triggers in which the corresponding action is taken only if a conditional expression is satisfied. The system can trace multiple threads and multiple processes. The tracing system provides a remote mode and an online mode. In remote mode, the developer sends the trace control information (which can include triggers and corresponding actions) to a remote user site together with a small executable image called the agent that enables a remote customer, to generate a trace file that represents execution of the client application at the remote site. In online mode, the developer can generate trace options (including triggers and corresponding actions), run and trace the client, and display the trace results in near real-time on the display screen during execution of the client program.
169 Citations
20 Claims
-
1. A method of tracing the execution of a computer program comprising:
-
generating trace control information which specifies triggers and associated actions; attaching a client-side trace library to a memory image of a program, wherein attaching to the memory image comprises replacing, based on the trace control information, one or more original instructions of the memory image with debugging instructions, thereby causing the debugging instructions to be executed where the original instructions would have been executed; maintaining the one or more original instructions in a separate data structure, thereby enabling the functionality of the application to be preserved; tracing execution of the computer program according to the trace control information, wherein tracing execution of the computer program comprises executing a first instrumented instruction associated with a first trigger, the first trigger being associated in the trace control information with a first condition, and further comprises branching to the client-side trace library to perform an action associated with the first instrumented instruction in the trace control information; and generating a trace log of said tracing, wherein the trace log reflects said actions performed during tracing; wherein performing the action associated with the first instrumented instruction comprises modifying a tracing action associated with a second instrumented instruction based upon determining that the first trigger has occurred, and further based upon determining that a condition associated with the first trigger is satisfied. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer-readable medium comprising executable instructions that direct one or more processors to perform a method comprising:
-
attaching a client-side trace library to a computer program in a memory; replacing one or more original instructions of the computer program with one or more debugging instructions configured to generate debugging information, thereby producing an attached computer program; maintaining data in the memory, the data configured to perform the one or more original instructions; executing the attached computer program; executing a first debugging instruction, the first debugging instruction being associated with a first condition and a first debugging action; branching to the client-side trace library and performing the first debugging action, wherein the first debugging action comprises modifying a level of tracing associated with a second debugging instruction, based upon the execution of the first debugging instruction, and further based upon a determination that the first condition is satisfied; and generating a trace log based on the execution of the attached computer program. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer-implemented method of dynamically adjusting the tracing of a computer program, the method comprising:
-
accessing trace control information comprising a plurality of triggers associated with actions and conditions; attaching a client-side trace library to a memory image of a computer program to create an instrumented computer program, wherein attaching to the memory image comprises identifying original instructions in the memory image corresponding to the plurality of triggers, and modifying the original instructions with instrumented instructions based upon the trace control information; maintaining data in the memory, the data configured to perform the one or more original instructions; running the instrumented computer program; executing, while running the instrumented computer program, a first instrumented instruction associated with a first trigger, the first trigger being associated with a first condition and a first action; and branching to the client-side trace library and performing the first action, wherein the first action comprises modifying a level of tracing associated with a second trigger, based upon the execution of the first instrumented instruction, and further based upon a determination that the first condition is satisfied. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification