# US 11,030,073 B2 · Hybrid instrumentation framework for multicore low power processors

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

- Number: US 11,030,073 B2
- Document ID: US11030073B2
- Status: Granted
- Kind: B2
- Application number: 16/670,681
- Filed: 2019-10-31
- Published: 2020-02-27
- Granted: 2021-06-08
- Earliest claimed: 2018-01-29
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Sam Idicula; Kirtikar Kashyap; Arun Raghavan; Evangelos Vlachos; Venkatraman Govindaraju
- Web page: https://patentgrep.com/patent/US11030073B2

## CPC

- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/0751: {Error or fault detection not based on redundancy (power supply failures G06F1/30; network fault management H04L41/06)}
- G06F 11/3024: {where the computing system component is a central processing unit [CPU]}
- G06F 11/3409: {for performance assessment}
- G06F 11/3457: {Performance evaluation by simulation}
- G06F 11/3471: {Address tracing}
- G06F 11/3692: {for test results analysis}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/30167: {of immediate specifier, e.g. constants}
- G06F 9/30189: {according to execution mode, e.g. mode flag}
- G06F 9/30196: {using decoder, e.g. decoder per instruction set, adaptable or programmable decoders}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/5016: {the resource being the memory}
- G06F 11/3447: {Performance evaluation by modeling}
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 11/3636: {by tracing the execution of the program}
- G06F 11/3644: {by instrumenting at runtime}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are provided for redundant execution by a better processor for intensive dynamic profiling after initial execution by a constrained processor. In an embodiment, a system of computer(s) receives a request to profile particular runtime aspects of an original binary executable. Based on the particular runtime aspects and without accessing source logic, the system statically rewrites the original binary executable into a rewritten binary executable that invokes telemetry instrumentation that makes observations of the particular runtime aspects and emits traces of those observations. A first processing core having low power (capacity) performs a first execution of the rewritten binary executable to make first observations and emit first traces of the first observations. Afterwards, a second processing core performs a second (redundant) execution of the original binary executable based on the first traces. The second execution generates a detailed dynamic performance profile based on the second execution.

## Claims

### Claim 1

A method comprising:
rewriting an original binary executable into a rewritten binary executable that invokes telemetry instrumentation that makes performance observations and emits traces of said performance observations;
first executing the rewritten binary executable to make first performance observations and emit first traces of said first performance observations;
second executing the original binary executable;
suspending, based on said first traces of said first performance observations of said first executing, a thread of said original binary executable;
generating a dynamic performance profile based on said second executing the original binary executable.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
said first executing the rewritten binary executable comprises a first relative execution ordering of a plurality of basic blocks;
said second executing the original binary executable comprises a second relative execution ordering of the plurality of basic blocks that is different from the first relative execution ordering.

### Claim 3 (depends on 1)

The method of claim 1, wherein:
said first executing the rewritten binary executable comprises generating a new basic block that is stored at a first memory address;
said second executing the original binary executable comprises:
generating same said new basic block that is stored at a second memory address that is not the first memory address,
intercepting an attempt to transfer control to the first memory address, and
transferring control to the second memory address.

### Claim 4 (depends on 3)

The method of claim 3, wherein said generating the new basic block comprises:
sending the new basic block to a remote computer, and
receiving, from the remote computer, the new basic block with said telemetry instrumentation added.

### Claim 5 (depends on 1)

The method of claim 1, further comprising storing the first traces of said first performance observations in a database.

### Claim 6 (depends on 5)

The method of claim 5, wherein said storing the first traces of said first performance observations comprises copying the first traces from a file.

### Claim 7 (depends on 1)

The method of claim 1, wherein said first executing the rewritten binary executable occurs on a computing device that relies on a power source that is: environmental, electromagnetic, thermal, mechanical, battery, and/or photovoltaic.

### Claim 8 (depends on 1)

The method of claim 1, wherein said first executing the rewritten binary executable occurs on a computing device that is one selected from the group consisting of: wearable and an internet of things (IoT) remote sensor.

### Claim 9 (depends on 1)

The method of claim 1, wherein:
said second executing the original binary executable occurs on a central processing unit (CPU) in a computing device;
said first executing the rewritten binary executable occurs on a coprocessor in same said computing device.

### Claim 10 (depends on 9)

The method of claim 9, wherein the CPU and the coprocessor reside on a same chip.

### Claim 11 (depends on 1)

The method of claim 1, further comprising detecting based on the dynamic performance profile, one selected from the group consisting of: heap or code reachability, heap or stack corruption, cache thrashing or coherency, buffer overflow, bus usage, pointer validity, machine instruction usage, subroutine call flow, control or data flow, latency, throughput, processing load, idleness, logical constraint compliance, and codebase hot spots.

### Claim 12

One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
rewriting an original binary executable into a rewritten binary executable that invokes telemetry instrumentation that makes performance observations and emits traces of said performance observations;
first executing the rewritten binary executable to make first performance observations and emit first traces of said first performance observations;
second executing the original binary executable;
suspending, based on said first traces of said first performance observations of said first executing, a thread of said original binary executable;
generating a dynamic performance profile based on said second executing the original binary executable.

### Claim 13 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein:
said first executing the rewritten binary executable comprises a first relative execution ordering of a plurality of basic blocks;
said second executing the original binary executable comprises a second relative execution ordering of the plurality of basic blocks that is different from the first relative execution ordering.

### Claim 14 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein:
said first executing the rewritten binary executable comprises generating a new basic block that is stored at a first memory address;
said second executing the original binary executable comprises:
generating same said new basic block that is stored at a second memory address that is not the first memory address,
intercepting an attempt to transfer control to the first memory address, and
transferring control to the second memory address.

### Claim 15 (depends on 14)

The one or more non-transitory computer-readable media of claim 14, wherein said generating the new basic block comprises:
sending the new basic block to a remote computer, and
receiving, from the remote computer, the new basic block with said telemetry instrumentation added.

### Claim 16 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein the instructions further cause storing the first traces of said first performance observations in a database.

### Claim 17 (depends on 16)

The one or more non-transitory computer-readable media of claim 16, wherein said storing the first traces of said first performance observations comprises copying the first traces from a file.

### Claim 18 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein said first executing the rewritten binary executable occurs on a computing device that relies on a power source that is one selected from the group consisting of: environmental, electromagnetic, thermal, mechanical, battery, and photovoltaic.

### Claim 19 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein said first executing the rewritten binary executable occurs on a computing device that is one selected from the group consisting of: wearable and an internet of things (IoT) remote sensor.

### Claim 20 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein:
said second executing the original binary executable occurs on a central processing unit (CPU) in a computing device;
said first executing the rewritten binary executable occurs on a coprocessor in same said computing device.
