# US 2012/0254841 A1 · Detecting irregular performing code within computer programs

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

- Number: US 2012/0254841 A1
- Document ID: US20120254841A1
- Status: Published application
- Kind: A1
- Application number: 13/525,530
- Filed: 2012-06-18
- Published: 2012-10-04
- Earliest claimed: 2008-04-27
- Assignees: International Business Machines Corporation
- Inventors: KIRK J. KRAUSS
- Web page: https://patentgrep.com/patent/US20120254841A1

## CPC

- G06F 11/3409: {for performance assessment}
- G06F 11/3419: {by assessing time}
- G06F 11/3466: {Performance evaluation by tracing or monitoring}
- G06F 11/3476: {Data logging (G06F11/14, G06F11/2205 take precedence)}
- G06F 9/45516: {Runtime code conversion or optimisation}
- G06F 11/3447: {Performance evaluation by modeling}
- G06F 2201/88: Monitoring involving counting
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method of finding portions of a computer program exhibiting irregular performance can include detecting an entry into a function of a computer program under test indicating a current execution of the function and, responsive to detecting an exit from the function, determining a count of a computing resource utilized by the function during the current execution of the function. The count of the computing resource can be compared with a count range determined according to at least one prior execution of the function. The function can be selectively represented within a call graph as a plurality of nodes according to the comparing.

## Claims

### Claim 1

A computer-implemented method of finding portions of a computer program exhibiting irregular performance, comprising:
detecting an entry into a function of a computer program under test indicating a current execution of the function;
responsive to detecting an exit from the function, determining a count of a computing resource utilized by the function during the current execution of the function;
comparing the count of the computing resource with a count range determined according to at least one prior execution of the function; and
selectively representing the function within a call graph as a plurality of nodes according to the comparing the count of the computing resource with a count range determined according to at least one prior execution of the function.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the comparing comprises:
identifying a stack frame associated with the function; and
comparing the count with the count range of at least one count element in the stack frame.

### Claim at position 3

3-4. (canceled)

### Claim 5 (depends on 2)

The computer-implemented method of claim 2, further comprising:
determining that the count is not within the count range of any count element;
creating a new count element; and
storing the count as part of the new count element.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the selectively representing comprises:
identifying a stack frame corresponding to the function;
determining a number of count elements associated with the stack frame, wherein each count element represents at least one execution of the function that utilized an amount of the computing resource within a range corresponding to the count element; and
displaying the call graph using a number of nodes to represent the function that depends upon the number of count elements associated with the stack frame corresponding to the function.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising selecting the computing resource to be time needed to complete a single execution of the function.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, further comprising
selecting the computing resource to be amount of allocated memory successfully requested by the function during a single execution.

### Claim 9

A computer-implemented method of finding portions of a computer program exhibiting irregular performance, comprising:
determining a count indicating usage of a computing resource during invocation of a function;
identifying a stack frame corresponding to the function, wherein the stack frame comprises at least one count element, wherein each count element represents at least one execution of the function that utilized an amount of the computing resource within a range corresponding to the count element;
comparing the count with the count range of each count element;
when the count is within the count range of a selected count element, aggregating the count within the selected count element;
when the count does not fall within any count range of the at least one count element, creating a new count element and adding the count to the new count element; and
outputting a call graph representing an execution of the computer program and including within the call graph a number of nodes, each representing the function, wherein the number of nodes depends upon a number of the count elements associated with the stack frame corresponding to the function.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, further comprising
defining the count range of each count element to depend upon an average count within each respective count element.

### Claim 11 (depends on 10)

The computer-implemented method of claim 10, further comprising
calculating the average count within each count element according to a plurality of counts from prior executions of the function.

### Claim 12 (depends on 9)

The computer-implemented method of claim 9, further comprising
selecting the computing resource to be time needed to complete a single execution of the function.

### Claim 13 (depends on 9)

The computer-implemented method of claim 9, further comprising
selecting the computing resource to be amount of allocated memory successfully requested by the function during a single execution.

### Claim 14

A computer program product comprising a computer-usable storage medium having stored therein computer-usable program code that finds portions of a computer program exhibiting irregular performance, the computer-usable program code, which when executed on a computer hardware system causes the computer hardware system to perform:
detecting an entry into a function of a computer program under test indicating a current execution of the function;
responsive to detecting an exit from the function, determining a count of a computing resource utilized by the function during the current execution of the function;
comparing the count of the computing resource with a count range determined according to at least one prior execution of the function; and
selectively representing the function within a call graph as a plurality of nodes according to the comparing.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein
the comparing comprises:
identifying a stack frame associated with the function; and
comparing the count with the count range of at least one count element associated with the stack frame.

### Claim at position 15

16-17. (canceled)

### Claim 18 (depends on 15)

The computer program product of claim 15, wherein the computer-usable program code further causes the computer hardware system to perform:
determining that the count is not within the count range of any count element;
creating a new count element; and
storing the count as part of the new count element.

### Claim 19 (depends on 14)

The computer program product of claim 14, wherein
the selectively representing comprises:
identifying a stack frame corresponding to the function;
determining a number of count elements associated with the stack frame, wherein each count element represents at least one execution of the function that utilized an amount of the computing resource within a range corresponding to the count element; and
displaying the call graph using a number of nodes to represent the function that depends upon the number of count elements associated with the stack frame corresponding to the function.

### Claim 20 (depends on 14)

The computer program product of claim 14, wherein the computer-usable program code further causes the computer hardware system to perform:
selecting the computing resource to be time needed to complete a single execution of the function or p1 computer-usable program code that selects the computing resource to be amount of allocated memory successfully requested by the function during a single execution.
