# US 2026/0064392 A1 · Techniques for hybrid instrumentation of program code

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

- Number: US 2026/0064392 A1
- Document ID: US20260064392A1
- Status: Published application
- Kind: A1
- Application number: 18/818,477
- Filed: 2024-08-28
- Published: 2026-03-05
- Earliest claimed: 2024-08-28
- Assignees: NVIDIA Corporation
- Applicants: Nvidia Corporation
- Inventors: Sana DAMANI; Jaewook SHIN; Mark William STEPHENSON; Aurelien CHARTIER; Anis LADRAM
- Web page: https://patentgrep.com/patent/US20260064392A1

## CPC

- G06F 8/443: {Optimisation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One embodiment of a method for code instrumentation. The method includes in response to determining that a first portion of machine code was not instrumented during compilation of the first portion of machine code: performing one or more operations to instrument at least one part of the first portion of machine code, and executing the first portion of machine code.

## Claims

### Claim 1

A computer-implemented method for code instrumentation, the method comprising:
in response to determining that a first portion of machine code was not instrumented during compilation of the first portion of machine code:
performing one or more operations to instrument at least one part of the first portion of machine code, and
executing the first portion of machine code.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising in response to determining that a second portion of machine code was instrumented during compilation of the second portion of machine code, executing the second portion of machine code without performing any operations to instrument the second portion of machine code.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, further comprising determining that the second portion of machine code was instrumented during compilation of the second portion of machine code based on a tag associated with the second portion of machine code.

### Claim 4 (depends on 2)

The computer-implemented method of claim 2, further comprising determining that the second portion of machine code was instrumented during compilation of the second portion of machine code based on a flag associated with the second portion of machine code in metadata associated with the machine code.

### Claim 5 (depends on 2)

The computer-implemented method of claim 2, further comprising determining that the second portion of machine code was instrumented during compilation of the second portion of machine code based on an instruction included in the second portion of machine code.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising in response to determining that a second portion of machine code was instrumented using first instrumentation code during compilation of the second portion of machine code:
performing one or more operations to instrument at least one part of the second portion of machine code using second instrumentation code; and
executing the second portion of machine code.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising determining that the first portion of machine code was not instrumented during compilation of the first portion of machine code based on metadata associated with the machine code.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, further comprising:
performing one or more operations to instrument source code during compilation of the source code into a second portion of machine code; and
performing one or more operations to tag the second portion of machine code as being instrumented.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, wherein the first portion of machine code comprises a function.

### Claim 10 (depends on 1)

The computer-implemented method of claim 1, wherein performing one or more operations to instrument the first portion of machine code comprises:
determining one or more instructions of interest in the first portion of machine code; and
injecting, into the first portion of machine code before the one or more instructions of interest, additional machine code.

### Claim 11

One or more non-transitory computer-readable media storing instructions that, when executed by at least one processor, cause the at least one processor to perform steps comprising:
in response to determining that a first portion of machine code was not instrumented during compilation of the first portion of machine code:
performing one or more operations to instrument at least one part of the first portion of machine code, and
executing the first portion of machine code.

### Claim 12 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instructions, when executed by the at least one processor, further cause the at least one processor to perform the step of in response to determining that a second portion of machine code was instrumented during compilation of the second portion of machine code, executing the second portion of machine code without performing any operations to instrument the second portion of machine code.

### Claim 13 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein the instructions, when executed by the at least one processor, further cause the at least one processor to perform the step of determining that the second portion of machine code was instrumented during compilation of the second portion of machine code based on a flag associated with the second portion of machine code in metadata associated with the machine code.

### Claim 14 (depends on 13)

The one or more non-transitory computer-readable media of claim 13, wherein the flag comprises an Executable and Linkable Format (ELF) flag.

### Claim 15 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein the instructions, when executed by the at least one processor, further cause the at least one processor to perform the step of determining that the second portion of machine code was instrumented during compilation of the second portion of machine code based on an instruction included in the second portion of machine code.

### Claim 16 (depends on 15)

The one or more non-transitory computer-readable media of claim 15, wherein the instruction comprises a No Operation (NOP) instruction.

### Claim 17 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instructions, when executed by the at least one processor, further cause the at least one processor to perform the steps of in response to determining that a second portion of machine code was instrumented using first instrumentation code during compilation of the second portion of machine code:
performing one or more operations to instrument at least one part of the second portion of machine code using second instrumentation code; and
executing the second portion of machine code.

### Claim 18 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the instructions, when executed by the at least one processor, further cause the at least one processor to perform the steps of:
performing one or more operations to instrument source code during compilation of the source code into a second portion of machine code; and
performing one or more operations to tag the second portion of machine code as being instrumented.

### Claim 19 (depends on 11)

The one or more non-transitory computer-readable media of claim 11, wherein the first portion of machine code comprises a function included in a programming library.

### Claim 20

A system, comprising:
one or more memories storing instructions; and
one or more processors that are coupled to the one or more memories and, when executing the instructions, are configured to perform the steps of:
in response to determining that a first portion of machine code was not instrumented during compilation of the first portion of machine code:
perform one or more operations to instrument at least one part of the first portion of machine code, and
execute the first portion of machine code.
