Historical control flow visualization in production diagnostics
Abstract
A diagnostic tool can dynamically instrument an application to collect program control flow information using one or more non-stopping production breakpoints. Analyzed program control flow information can be displayed. Dynamic code rewriting techniques can be used to change the production software without deploying new source code. The information collected at the non-stopping breakpoint can include the actual control flow that an instance of the production application took to reach the breakpoint in addition to information about the data. The analyzed control flow information can be visualized in a diagnostic tool allowing a user to see the path an execution of the program took to arrive at a particular breakpoint.
Claims
exact text as granted — not AI-modifiedWhat is claimed:
1. A system comprising:
at least one processor:
a memory connected to the at least one processor; and
a diagnostic tool comprising:
at least one program module loaded into the memory, the at least one program module:
creating an instrumentation file that specifies instructions to be dynamically inserted into a function of an application to analyze and collect control flow data associated with invocation of the function without stopping execution of the application; and
providing a visualization of the control flow data associated with invocation of the function, the function comprising a plurality of basic blocks, the visualization including how many times each basic block of the plurality of basic blocks was executed in the invocation of the function.
2. The system of claim 1 , wherein the visualization of control flow data comprises exception information comprising a type of an exception thrown in a basic block of the plurality of basic blocks and an instruction in the basic block at which the exception was thrown mapped to a line of a source program represented by the basic block.
3. The system of claim 1 , further comprising at least one program module that receives information from a diagnostic tool that gathers historical control flow information in a running production application.
4. The system of claim 1 , further comprising at least one program module that receives information from a diagnostic tool that gathers control flow information in a live debugging session.
5. The system of claim 1 , further comprising at least one program module that aggregates local control flow information for a plurality of invocations of a function to provide a visualization of global control flow for the function.
6. The system of claim 1 , further comprising at least one program module that creates an instrumentation file that specifies instructions to be dynamically inserted into a function during execution of the function.
7. The system of claim 6 , further comprising at least one program module that sends the instrumentation file to a production environment.
8. A method comprising:
dynamically inserting by at least one processor of a computing device into a function of an application, instructions comprising at least one non-stopping breakpoint, the instructions specified in an instrumentation file;
analyzing and collecting control flow data associated with invocation of the function without stopping execution of the application; and
visualizing at least one basic block comprising the invoked function and a number of times the at least one basic block was executed.
9. The method of claim 8 , further comprising:
providing, by the at least one processor, the collected control flow data to a control flow visualizer.
10. The method of claim 8 , further comprising:
collecting, by the at least one processor, control flow data by creating a snapshot of process data.
11. The method of claim 8 , further comprising:
collecting, by the at least one processor, control flow data, the control flow data comprising exception information.
12. The method of claim 11 , further comprising:
collecting, by the at least one processor, exception information comprising a type of the exception and an instruction in a basic block at which the exception was thrown.
13. The method of claim 12 , further comprising:
collecting, by the at least one processor, control flow data local to a particular function invocation.
14. A device, comprising:
at least one processor and a memory; the at least one processor configured to:
create an instrumentation file comprising debug statements comprising non-stopping breakpoints;
gather control flow information local to a particular function invocation in an application; and
create a visualization of the control flow information, the visualization comprising at least one basic block comprising the invoked function and a number of times the at least one basic block was executed.
15. The device of claim 14 , wherein the at least one processor is further configured to:
dynamically instrument a function in an application to collect program control flow information without stopping execution of the application.
16. The device of claim 14 , wherein the at least one processor is further configured to:
display exception information comprising where in the at least one basic block an exception was thrown.
17. The device of claim 14 , wherein the at least one processor is further configured to:
display exception information comprising a type of exception thrown.
18. The device of claim 14 , wherein the at least one processor is further configured to:
display a path an execution of the application took to arrive at a particular breakpoint.
19. The device of claim 14 , wherein the at least one processor is further configured to:
provide debug information for the application, the application executing in a production environment.
20. The device of claim 14 , wherein the at least one processor is further configured to:
provide debug information for the application, the application executing in a non-production environment.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.