IP Library Granted Patent US 7,784,040
Granted Patent B2
US 7,784,040 · App. 11/274,537 · Granted Aug 24, 2010

Profiling of performance behaviour of executed loops

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,784,040
App. No.
11/274,537
Granted
Aug 24, 2010
Kind
B2
Abstract

A method and system for profiling performance behaviour of executed loops. For each invocation of a loop, a count of a measured event is incremented. A display is provided for a loop ( 209 ) showing the number of measured events for each of the loop's invocations. The code of a loop is instrumented ( 204 ) to obtain the count of loop invocations ( 207 ) and the occurrences of the measured event ( 208 ).

Claims (38)

1. A computer-implemented method for profiling performance behaviour of executed loops, comprising the steps of:

repeatedly invoking a loop during execution of program code by encountering statements in the code that may be iterated a plurality of times in succession and for each loop invocation;

incrementing an invocation number to count the loop invocation;

iterating the loop by repeatedly executing the statements in succession;

while iterating the loop maintaining a count of loop iterations during the loop invocation and maintaining a count of occurrences of a measured event during the loop invocation;

making a determination not to terminate the loop invocation; and

producing a display wherein each invocation number is associated with the count of occurrences of the measured event, respectively, wherein any of the steps are implemented in either of computer hardware or computer software and embodied in a computer-readable medium.

2. A method as claimed in claim 1 , wherein the measured event is the count of loop iterations during the loop invocation.

3. A method as claimed in claim 1 , wherein the measured event is a number of cache misses in the loop invocation.

4. A method as claimed in claim 1 , wherein code of the loop is instrumented to obtain the count of occurrences of the measured event during the loop invocation.

5. A method as claimed in claim 4 , wherein the code of the loop is instrumented by replacing an entry point of the loop with a jump to a first wrapper code.

6. A method as claimed in claim 5 , wherein the first wrapper code allocates an array of counters to the loop invocation and increments a counter holding the invocation number.

7. A computer software product for profiling performance behaviour of executed loops, including a computer-readable storage medium in which computer program instructions are stored, which instructions, when executed by a computer, cause the computer to perform the steps of:

repeatedly invoking a loop during execution of program code by encountering statements in the code that may be iterated a plurality of times in succession and for each loop invocation;

incrementing an invocation number to count the loop invocation;

iterating the loop by repeatedly executing the statements in succession;

while iterating the loop maintaining a count of loop iterations during the loop invocation and maintaining a count of occurrences of a measured event during the loop invocation;

making a determination not to terminate the loop invocation; and

producing a display wherein each invocation number is associated with the count of occurrences of the measured event, respectively.

8. A computer software product as claimed in claim 7 , wherein the measured event is the count of loop iterations during the loop invocation.

9. A computer software product as claimed in claim 7 , wherein the measured event is a number of cache misses in the loop invocation.

10. A computer software product as claimed in claim 7 , wherein code of the loop is instrumented to obtain the count of occurrences of the measured event during the loop invocation.

11. A computer software product as claimed in claim 10 , wherein the code of the loop is instrumented by replacing an entry point of the loop with a jump to a first wrapper code.

12. A computer software product as claimed in claim 11 , wherein the first wrapper code allocates an array of counters to the loop invocation and increments a counter holding the invocation number.

13. A data processing system for profiling performance behaviour of executed loops, comprising:

a processor;

a memory accessible to the processor storing programs therein, the programs including a test program, wherein execution of the test program cause the processor to perform the steps of:

repeatedly invoking a loop during execution of program code by encountering statements in the code that may be iterated a plurality of times in succession and for each loop invocation;

incrementing an invocation number to count the loop invocation;

iterating the loop by repeatedly executing the statements in succession;

while iterating the loop maintaining a count of loop iterations during the loop invocation and maintaining a count of occurrences of a measured event during the loop invocation;

making a determination not to terminate the loop invocation; and

producing a display wherein each invocation number is associated with the count of occurrences of the measured event, respectively.

14. A data processing system as claimed in claim 13 , wherein the measured event is the count of loop iterations during the loop invocation.

15. A data processing system as claimed in claim 13 , wherein the measured event is a number of cache misses in the loop invocation.

16. A data processing system as claimed in claim 13 , wherein the processor is operative for instrumenting the code of the loop to obtain the count of occurrences of the measured event during the loop invocation.

17. A data processing system as claimed in claim 16 , wherein the code of the loop is instrumented by replacing an entry point of the loop with a jump to a first wrapper code.

18. A data processing system as claimed in claim 17 , wherein the first wrapper code allocates an array of counters to the loop invocation and increments a counter holding the invocation number.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 13, 2015
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: LINKEDIN CORPORATION
Reel/Frame 035201/0479 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 29, 2005
From: HABER, GAD; ZALMANOVICI, MARCEL
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 017074/0334 →