# US 2014/0157240 A1 · Method and apparatus for enabling an executed control flow path through computer program code to be determined

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

- Number: US 2014/0157240 A1
- Document ID: US20140157240A1
- Status: Published application
- Kind: A1
- Application number: 14/233,401
- Filed: 2011-07-20
- Published: 2014-06-05
- Earliest claimed: 2011-07-20
- Assignees: Freescale Semiconductor, Inc.
- Inventors: David Baca
- Web page: https://patentgrep.com/patent/US20140157240A1

## CPC

- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 11/3636: {by tracing the execution of the program}
- G06F 2201/865: Monitoring of software
- G06F 2201/88: Monitoring involving counting
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of enabling an executed control flow path through computer program code to be determined. The method comprising modelling cumulative instruction counts for control flow paths through the computer program code, and inserting at least one probe within the computer program code to enable a cumulative instruction count value for at least one control flow path of the computer program code to be accessed.

## Claims

### Claim 1

A method of enabling an executed control flow path through computer program code to be determined, the method comprising:
modelling cumulative instruction counts for control flow paths through the computer program code; and
inserting at least one probe within the computer program code to enable a cumulative instruction count value for at least one control flow path of the computer program code to be accessed.

### Claim 2 (depends on 1)

The method of claim 1 further comprising accessing the cumulative instruction count value for the at least one control flow path of the computer program code.

### Claim 3 (depends on 1)

The method of claim 1 further comprising generating an expanded control flow graph comprising vertices representing individual instances of blocks of code within different control flow paths through the computer program code.

### Claim 4 (depends on 3)

The method of claim 3 further comprising determining cumulative instruction count values for the vertices within the expanded control flow graph.

### Claim 5 (depends on 1)

The method of claim 1 further comprising determining a reduced set of probes to be inserted within the computer program code.

### Claim 6 (depends on 5)

The method of claim 5 wherein the reduced set of probes to be inserted within the computer program code is determined based at least partly on the cumulative instruction count values for the vertices within the expanded control flow graph.

### Claim 7 (depends on 3)

The method of claim 3 wherein the method further comprises:
constructing a control flow graph of the computer program code comprising vertices representing blocks of code within the computer program code; and
expanding the control flow graph to comprise vertices representing individual instances of blocks of code within different control flow paths through the program code.

### Claim 8 (depends on 3)

The method of claim 3 further comprising identifying at least one loop hitting vertex within the computer program code.

### Claim 9 (depends on 8)

The method of claim 8 further comprising expanding the at least one loop hitting vertex to comprise at least one from a group consisting of:
at least one reference vertex;
at least one return vertex; and
at least one regressive edge from the at least one return vertex to the at least one reference vertex.

### Claim 10 (depends on 5)

The method of claim 5 further comprising determining a reduced set of probes to be implemented within the computer program code, whereby the reduced set of probes comprises at least one from a group of:
at least one probe within at least one exiting block of code of the computer program code; and
at least one probe within at least one block of code represented by a loop hitting set vertex of the expanded control flow graph.

### Claim 11 (depends on 10)

The method of claim 10 wherein the reduced set of probes comprises at least one probe within at least one exiting block of code of the computer program code, and the method further comprises inserting the at least one probe within the at least one exiting block of code of the computer program code, whereby the at least one probe incorporated within the at least one exiting block of code of the computer program code is arranged to read and output an instruction count for the execution of the computer program code.

### Claim 12 (depends on 10)

The method of claim 10 wherein the reduced set of probes comprises at least one probe within at least one block of code represented by a loop hitting set vertex of the expanded control flow graph; and the method further comprises incorporating the at least one probe within the at least one block of code represented by a loop hitting set vertex, whereby the at least one probe is arranged to bound an instruction count for the execution of the computer program code.

### Claim 13 (depends on 1)

A method of determining control flow during execution of computer program code, the method comprising:
inserting at least one probe within the computer program code in accordance with the method of claim 1;
executing the computer program code within an instruction processing module;
receiving an indication of an instruction count value for the execution of the computer program code; and
determining at least one control flow path during the execution of the computer program code based at least partly on the received indication of an instruction count value therefor.

### Claim 14

(canceled)

### Claim 15

(canceled)
