# US 12,001,316 B2 · Systems, methods, and devices for vertically integrated instrumentation and trace reconstruction

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,001,316 B2
- Document ID: US12001316B2
- Status: Granted
- Kind: B2
- Application number: 18/184,848
- Filed: 2023-03-16
- Published: 2023-10-12
- Granted: 2024-06-04
- Earliest claimed: 2016-10-11
- Assignees: Green Hills Software, Inc.
- Applicants: Green Hills Software LLC
- Inventors: Daniel D. O'Dowd; Steven H. Ginzburg; Nikola Valerjev; Gregory Davis; Greg Eddington; Nathan Field; Mallory M. Green; Phillip Kelly; Michael B. Wolf; Tom Zavisca
- Web page: https://patentgrep.com/patent/US12001316B2

## CPC

- G06F 11/3644: {by instrumenting at runtime}
- G06F 11/302: {where the computing system component is a software system}
- G06F 11/3096: {wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data}
- G06F 11/323: {Visualisation of programs or trace data}
- G06F 11/3476: {Data logging (G06F11/14, G06F11/2205 take precedence)}
- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In an embodiment, a system is configured to replay and/or reconstruct execution events and system states in real time or substantially in real time starting from the point when execution of a target program has stopped to the point when the user desires to step through the target program's execution in order to debug the software. In an embodiment, a system is configured to efficiently collect trace data that is sufficient to reconstruct the state of a computer system at any point of time from the start of execution to the time execution was stopped. Efficient and effective debugging of the software can be performed using embodiments of the disclosed methods, systems, and devices.

## Claims

### Claim 1

A non-transitory computer-readable storage medium storing instructions that, when executed by at least one processor, cause the at least one processor to perform a method of instrumenting at least one computer program, the method comprising:
during building of the at least one computer program, instrumenting the at least one computer program by adding, as an instrumentation, a plurality of instrumentation instructions to the at least one computer program to enable a collection of information about an execution of the at least one computer program,
wherein the plurality of instrumentation instructions negatively impact at least one metric comprising one or more of: a measurement of run-time performance, a measurement of memory footprint, or a measurement of code density of the at least one computer program;
causing a software tool to identify at least one instrumentation instruction of the plurality of instrumentation instructions based on detecting access to a reserved register by the at least one instrumentation instruction of the plurality of instrumentation instructions; and
causing the software tool to make one or more changes in an execution of the at least one instrumentation instruction of the plurality of instrumentation instructions within the at least one computer program,
wherein the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions cause a positive impact on the at least one metric.

### Claim 2 (depends on 1)

The non-transitory computer-readable storage medium of claim 1, wherein causing the software tool to make the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions comprises causing a removal of the at least one instrumentation instruction of the plurality of instrumentation instructions from the at least one computer program.

### Claim 3 (depends on 2)

The non-transitory computer-readable storage medium of claim 2, wherein the removal of the at least one instrumentation instruction of the plurality of instrumentation instructions is made without performing a recompilation of the at least one computer program.

### Claim 4 (depends on 1)

The non-transitory computer-readable storage medium of claim 1, wherein the software tool comprises a linker.

### Claim 5 (depends on 1)

The non-transitory computer-readable storage medium of claim 1, wherein causing the software tool to make the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions comprises causing the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions during the execution of the at least one computer program.

### Claim 6 (depends on 1)

The non-transitory computer-readable storage medium of claim 1, wherein the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions cause a change in the collection of information about the execution of the at least one computer program.

### Claim 7 (depends on 6)

The non-transitory computer-readable storage medium of claim 6, wherein the collection of information about the execution of the at least one computer program stops at a time after occurrence of the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions.

### Claim 8

A method of instrumenting at least one computer program, the method comprising:
by at least one processor:
during building of the at least one computer program, instrumenting the at least one computer program by adding, as an instrumentation, a plurality of instrumentation instructions to the at least one computer program to enable a collection of information about an execution of the at least one computer program,
wherein the plurality of instrumentation instructions negatively impact at least one metric comprising one or more of: a measurement of run-time performance, a measurement of memory footprint, or a measurement of code density of the at least one computer program;
causing a software tool to identify at least one instrumentation instruction of the plurality of instrumentation instructions based on detecting access to a reserved register by the at least one instrumentation instruction of the plurality of instrumentation instructions; and
causing the software tool to make one or more changes in an execution of the at least one instrumentation instruction of the plurality of instrumentation instructions within the at least one computer program,
wherein the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions cause a positive impact on the at least one metric.

### Claim 9 (depends on 8)

The method of claim 8, wherein causing the software tool to make the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions comprises causing a removal of the at least one instrumentation instruction of the plurality of instrumentation instructions without performing a recompilation of the at least one computer program.

### Claim 10 (depends on 8)

The method of claim 8, wherein causing the software tool to make the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions comprises causing the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions during the execution of the at least one computer program.

### Claim 11 (depends on 8)

The method of claim 8, wherein the software tool comprises a linker.

### Claim 12

A non-transitory computer-readable storage medium storing instructions that, when executed by at least one processor, cause the at least one processor to perform a method of instrumenting at least one computer program, the method comprising:
during building of the at least one computer program, instrumenting the at least one computer program by adding, as an instrumentation, a plurality of instrumentation instructions to the at least one computer program to enable a collection of information about an execution of the at least one computer program,
wherein the plurality of instrumentation instructions negatively impact at least one metric comprising one or more of: a measurement of run-time performance, a measurement of memory footprint, or a measurement of code density of the at least one computer program; and
causing a software tool to make one or more changes in an execution of at least one instrumentation instruction of the plurality of instrumentation instructions within the at least one computer program,
wherein the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions cause the at least one instrumentation instruction of the plurality of instrumentation instructions not to be executed, and
wherein the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions cause a positive impact on the at least one metric.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein the at least one instrumentation instruction of the plurality of instrumentation instructions is preceded by one or more guard instructions.

### Claim 14 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein the software tool is caused to perform a modification of the one or more guard instructions during the execution of the at least one computer program, and wherein the modification of the one or more guard instructions during the execution of the at least one computer program causes the at least one instrumentation instruction of the plurality of instrumentation instructions not to be executed.

### Claim 15 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein the modification of the one or more guard instructions during the execution of the at least one computer program is effected without performing a recompilation of the at least one computer program.

### Claim 16 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein the modification of the one or more guard instructions during the execution of the at least one computer program is effected without restarting of the at least one computer program.

### Claim 17 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein a user's action results in the modification of the one or more guard instructions during the execution of the at least one computer program.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, wherein the user's action comprises specifying one or more conditions under which the modification of the one or more guard instructions during the execution of the at least one computer program is to take place.

### Claim 19 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein the modification of the one or more guard instructions during the execution of the at least one computer program comprises changing the one or more guard instructions to one or more branch instructions.

### Claim 20 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, further comprising, subsequently to performing the modification of the one or more guard instructions during the execution of the at least one computer program, reversing the modification of the one or more guard instructions during the execution of the at least one computer program to cause the at least one instrumentation instruction of the plurality of instrumentation instructions to be executed.

### Claim 21 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein the software tool comprises a debugger.

### Claim 22

A method of instrumenting at least one computer program, the method comprising:
by at least one processor:
during building of the at least one computer program, instrumenting the at least one computer program by adding, as an instrumentation, a plurality of instrumentation instructions to the at least one computer program to enable a collection of information about an execution of the at least one computer program,
wherein the plurality of instrumentation instructions negatively impact at least one metric comprising one or more of: a measurement of run-time performance, a measurement of memory footprint, or a measurement of code density of the at least one computer program; and
causing a software tool to make one or more changes in an execution of at least one instrumentation instruction of the plurality of instrumentation instructions within the at least one computer program,
wherein the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions cause the at least one instrumentation instruction of the plurality of instrumentation instructions not to be executed, and
wherein the one or more changes in the execution of the at least one instrumentation instruction of the plurality of instrumentation instructions cause a positive impact on the at least one metric.

### Claim 23 (depends on 22)

The method of claim 22, wherein the at least one instrumentation instruction of the plurality of instrumentation instructions is preceded by one or more guard instructions.

### Claim 24 (depends on 23)

The method of claim 23, wherein the software tool is caused to perform a modification of the one or more guard instructions during the execution of the at least one computer program, and wherein the modification of the one or more guard instructions during the execution of the at least one computer program causes the at least one instrumentation instruction of the plurality of instrumentation instructions not to be executed.

### Claim 25 (depends on 24)

The method of claim 24, wherein the modification of the one or more guard instructions during the execution of the at least one computer program is effected without performing a recompilation of the at least one computer program.

### Claim 26 (depends on 24)

The method of claim 24, wherein the modification of the one or more guard instructions during the execution of the at least one computer program is effected without restarting of the at least one computer program.

### Claim 27 (depends on 24)

The method of claim 24, wherein a user's action results in the modification of the one or more guard instructions during the execution of the at least one computer program.

### Claim 28 (depends on 27)

The method of claim 27, wherein the user's action comprises specifying one or more conditions under which the modification of the one or more guard instructions during the execution of the at least one computer program is to take place.

### Claim 29 (depends on 24)

The method of claim 24, wherein the modification of the one or more guard instructions during the execution of the at least one computer program comprises changing the one or more guard instructions to one or more branch instructions.

### Claim 30 (depends on 24)

The method of claim 24, further comprising, subsequently to performing the modification of the one or more guard instructions during the execution of the at least one computer program, reversing the modification of the one or more guard instructions during the execution of the at least one computer program to cause the at least one instrumentation instruction of the plurality of instrumentation instructions to be executed.

### Claim 31 (depends on 22)

The method of claim 22, wherein the software tool comprises a debugger.
