# US 2026/0300141 A1 · Dynamic code generation of tracepoints and environment-specific code coverage calculation

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

- Number: US 2026/0300141 A1
- Document ID: US20260300141A1
- Status: Published application
- Kind: A1
- Application number: 19/199,637
- Filed: 2025-05-06
- Published: 2026-10-01
- Earliest claimed: 2025-03-31
- Assignees: Cisco Technology, Inc.
- Applicants: Cisco Technology, Inc.
- Inventors: Stephen Craig Connors, JR.
- Web page: https://patentgrep.com/patent/US20260300141A1

## CPC

- G06F 11/3676: {for coverage analysis}
- G06F 11/3636: {by tracing the execution of the program}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method are provided for dynamically determining an environment-specific code coverage. Tracepoints are embedded in a first version of source code sing a macro that generates the unique identifier of a tracepoint based on one or more compile-time parameters associated with the tracepoint (e.g., the file and line of the tracepoint). A historical log of all tracepoints executed for the source code (including for previous versions) is generated by registering each executed tracepoint in persistent memory, upon its execution. The number of tracepoints executed at least once during a runtime session is counted, and the dynamic code coverage can be calculated using a ratio of the runtime count divided by the number of tracepoints in the historical log.

## Claims

### Claim 1

A method for determining code coverage, the method comprising:
embedding tracepoints in a first version of source code, each of the tracepoints having a unique identifier;
determining first information representing first set of the tracepoints that have been executed at least once within a first period;
determining second information representing second set of the tracepoints that have been activated during a second period spanning a first test of the first version of the source code; and
analyzing the first information and the second information to generate an analysis result representing a code coverage of the first test.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
the tracepoints are embedded in the first version of the source code using a macro that generates the unique identifier of a tracepoint based on one or more compile-time parameters associated with the tracepoint,
the determining of the first information includes registering the first set of the tracepoints when first executed, the first set of the tracepoints being registered by storing unique identifiers of the first set of the tracepoints in a persistent memory, and the first information includes a first count representing how many tracepoints are in the first set of the tracepoints, and
the determining of the second information includes counting the second set of the tracepoints, which are activated during a runtime session of the first test, to provide a second count representing how many tracepoints are in the second set of the tracepoints.

### Claim 3 (depends on 1, 2)

The method of claim 2, The method of claim 1, wherein:
the one or more compile-time parameters associated with the tracepoint include at least one of a file name or a line number, and
the analysis result includes a ratio of the second count and the first count.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the first period includes a testing period that includes a first time during which the first version of the source code is executed and includes a historical period during which a second version of the source code is executed,
the second period includes the testing period that includes a second time during which the first version of the source code is executed,
the first version of the source code is a next version of the source code,
the second version of the source code is a current version of the source code or a previous version of the source code, and
a list of the unique identifiers of the tracepoints that is stored in a persistent memory is a historical log of tracepoints that have been active in a specific environment.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
replacing, in a production environment, a previous program based on the second version of the source code with an updated program based on the first version of the source code, when the analysis result satisfies one or more code-coverage criteria.

### Claim 6 (depends on 1)

The method of claim 1, wherein the determining of the first information includes:
generating a historical log of tracepoints that have been active in an environment as the first set of the tracepoints, and
the historical log is generated by registering, upon a first execution of a tracepoint, the unique identifier of the tracepoint in a persistent storage medium.

### Claim 7 (depends on 1)

The method of claim 1, wherein the determining of the first information includes:
ensuring each of the tracepoints is registered at most once by defining a registers—tracepoint function that registers a tracepoint only upon a first time the tracepoint is executed, wherein the registers-tracepoint function is defined using a static flag and a mutual exclusion synchronization primitive that provides thread safety.

### Claim 8 (depends on 1)

The method of claim 1, wherein determining the first information representing the first set of the tracepoints is dynamic such that the first set of the tracepoints dynamically grows to provide an environment-specific code coverage such that the first period is open ended with respect an end time, wherein newly executed tracepoints continue to be added to the first set of the tracepoints.

### Claim 9 (depends on 6)

The method of claim 6, wherein storing the unique identifier of the tracepoint in the persistent storage medium further includes asynchronously persisting tracepoint registration data that includes the unique identifier from an in-memory data structure to the persistent storage medium.

### Claim 10 (depends on 1)

The method of claim 1, wherein:
the analysis result includes a comparison between unique identifiers of the first set of the tracepoints with the unique identifiers of respective tracepoints of the second set of the tracepoints to determine which of the first set of the tracepoints were not activated during a runtime session of the first test, and
the method further includes:
using the analysis result to generate synthetic test data directed to testing parts of the first version of the source code corresponding to tracepoints of the first set of the tracepoints that are to determined were not activated during the runtime session of the first test, and
during a continuation of the first test, processing the synthetic test data using the first version of the source code and increasing the second set of the tracepoints to include tracepoints that have been activated during the second period spanning the first test, including the continuation of the first test.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
performing the first test of the first version of the source code by executing an executable program based on the first version of the source code.

### Claim 12 (depends on 1)

The method of claim 1, wherein:
the first test is performed on a shadow dataplane of a multi-dataplane architecture in which the shadow dataplane executes logic instructions based on the first version of the source code and a primary dataplane of the multi-dataplane architecture performs other logic instructions based on a second version of the source code,
the first version of the source code is a next version of the source code, and
the second version of the source code is an earlier version of the source code, which was written before the next version of the source code.

### Claim 13

A computing system comprising:
one or more processors; and
a memory storing instructions that, when executed by the one or more processors, configure the computing system to:
embed tracepoints in a first version of source code, each of the tracepoints having a unique identifier;
determine first information representing first set of the tracepoints that have been executed at least once within a first period;
determine second information representing second set of the tracepoints that have been activated during a second period spanning a first test of the first version of the source code; and
analyze the first information and the second information to generate an analysis result representing a code coverage of the first test.

### Claim 14 (depends on 13)

The computing system of claim 13, wherein:
the tracepoints are embedded in the first version of the source code using a macro that generates the unique identifier of a tracepoint based on one or more compile-time parameters associated with the tracepoint,
the determining of the first information includes registering the first set of the tracepoints when first executed, the first set of the tracepoints being registered by storing unique identifiers of the first set of the tracepoints in a persistent memory, and the first information includes a first count representing how many tracepoints are in the first set of the tracepoints, and
the determining of the second information includes counting the second set of the tracepoints, which are activated during a runtime session of the first test, to provide a second count representing how many tracepoints are in the second set of the tracepoints.

### Claim 15 (depends on 14)

The computing system of claim 14, wherein:
the one or more compile-time parameters associated with the tracepoint include at least one of a file name or a line number, and
the analysis result includes a ratio of the second count and the first count.

### Claim 16 (depends on 13)

The computing system of claim 13, wherein:
the first period includes a testing period that includes a first time during which the first version of the source code is executed and includes a historical period during which a second version of the source code is executed,
the second period includes the testing period that includes a second time during which the first version of the source code is executed,
the first version of the source code is a next version of the source code,
the second version of the source code is a current version of the source code or a previous version of the source code, and
a list of the unique identifiers of the tracepoints that is stored in a persistent memory is a historical log of tracepoints that have been active in a specific environment.

### Claim 17 (depends on 16)

The computing system of claim 16, wherein the instructions further configure the computing system to:
replace, in a production environment, a previous program based on the second version of the source code with an updated program based on the first version of the source code, when the analysis result satisfies one or more code-coverage criteria.

### Claim 18 (depends on 13)

The computing system of claim 13, wherein, to determine the first information, the instructions further configure the computing system to:
generate a historical log of tracepoints that have been active in an environment as the first set of the tracepoints, wherein
the historical log is generated by registering, upon a first execution of a tracepoint, the unique identifier of the tracepoint in a persistent storage medium.

### Claim 19 (depends on 18)

The computing system of claim 18, wherein registering the unique identifier of the tracepoint in the persistent storage medium further includes asynchronously persisting tracepoint registration data that includes the unique identifier from an in-memory data structure to the persistent storage medium.

### Claim 20

A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:
embed tracepoints in a first version of source code, each of the tracepoints having a unique identifier;
determine first information representing first set of the tracepoints that have been executed at least once within a first period;
determine second information representing second set of the tracepoints that have been activated during a second period spanning a first test of the first version of the source code; and
analyze the first information and the second information to generate an analysis result representing a code coverage of the first test.
