IP Library › Granted Patent US 11,080,172
Granted Patent B2
US 11,080,172 · App. 16/572,714 · Granted Aug 3, 2021

Instruction count based compiler performance regression testing

Inventor: Gaby Baghdadi (Scarborough, CA)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F11/3684G06F11/3688
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 11,080,172
App. No.
16/572,714
Granted
Aug 3, 2021
Kind
B2
Abstract

Techniques for instruction count based compiler performance regression testing are described herein. An aspect includes identifying a subset of a plurality of test cases that are regression suspects for a current build of a compiler, wherein the identifying of a test case of the plurality of test cases as a regression suspect is performed based on an instruction count associated with compiling or running of the test case using the current build of the compiler and a previous build of the compiler. Another aspect includes processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions.

Claims (67)

1. A computer-implemented method comprising:

identifying, by a processor, a subset of a plurality of test cases, wherein the subset comprises test cases of the plurality of test cases that are identified as regression suspects for a current build of a compiler, and wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

determining a first instruction count associated with compiling or running of the test case based on the current build of the compiler; and

determining a second instruction count associated with compiling or running of the test case based on a previous build of the compiler;

determining a difference between the second instruction count and the first instruction count; and

adding the test case to the subset based on the difference between the second instruction count and the first instruction count being above a threshold; and

processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions.

2. The method of claim 1 , wherein identifying the subset of the plurality of test cases comprises processing the plurality of test cases in parallel, and wherein processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions comprises processing the subset of the plurality of test cases sequentially.

3. The method of claim 1 , wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

compiling the test case by the previous build of the compiler;

determining the second instruction count based on the compiling of the test case by the previous build of the compiler;

compiling the test case by the current build of the compiler; and

determining the first instruction count based on the compiling of the test case by the current build of the compiler.

4. The method of claim 1 , wherein the threshold comprises a percentage increase or decrease in the first instruction count with respect to the second instruction count.

5. The method of claim 1 , wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

running first object code of the test case that was compiled by the previous build of the compiler;

determining the second instruction count based on the running of the first object code;

running second object code of the test case that was compiled by the current build of the compiler; and

determining the first instruction count based on the running of the second object code.

6. The method of claim 1 , wherein processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions comprises:

determining a first time, the first time comprising one of a first central processing unit (CPU) time or a first elapsed time, for a test case of the subset of the plurality of test cases associated with the previous build of the compiler;

determining a second time, the second time comprising one of a second CPU time or a second elapsed time, for the test case of the plurality of test cases associated with the current build of the compiler;

determining that the test case is associated with a confirmed regression based on an increase in the second time with respect to the first time, wherein the compiler is modified based on the test case that is associated with the confirmed regression.

7. A system comprising:

a memory having computer readable instructions; and

one or more processors for executing the computer readable instructions, the computer readable instructions controlling the one or more processors to perform operations comprising:

identifying a subset of a plurality of test cases, wherein the subset comprises test cases of the plurality of test cases that are identified as regression suspects for a current build of a compiler, and wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

determining a first instruction count associated with compiling or running of the test case based on the current build of the compiler; and

determining a second instruction count associated with compiling or running of the test case based on a previous build of the compiler;

determining a difference between the second instruction count and the first instruction count; and

adding the test case to the subset based on the difference between the second instruction count and the first instruction count being above a threshold; and

processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions.

8. The system of claim 7 , wherein identifying the subset of the plurality of test cases comprises processing the plurality of test cases in parallel, and wherein processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions comprises processing the subset of the plurality of test cases sequentially.

9. The system of claim 7 , wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

compiling the test case by the previous build of the compiler;

determining the second instruction count based on the compiling of the test case by the previous build of the compiler;

compiling the test case by the current build of the compiler; and

determining the first instruction count based on the compiling of the test case by the current build of the compiler.

10. The system of claim 7 , wherein the threshold comprises a percentage increase or decrease in the first instruction count with respect to the second instruction count.

11. The system of claim 7 , wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

running first object code of the test case that was compiled by the previous build of the compiler;

determining the second instruction count based on the running of the first object code;

running second object code of the test case that was compiled by the current build of the compiler; and

determining the first instruction count based on the running of the second object code.

12. The system of claim 7 , wherein processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions comprises:

determining a first time, the first time comprising one of a first central processing unit (CPU) time or a first elapsed time, for a test case of the subset of the plurality of test cases associated with the previous build of the compiler;

determining a second time, the second time comprising one of a second CPU time or a second elapsed time, for the test case of the plurality of test cases associated with the current build of the compiler;

determining that the test case is associated with a confirmed regression based on an increase in the second time with respect to the first time, wherein the compiler is modified based on the test case that is associated with the confirmed regression.

13. A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to perform operations comprising:

identifying a subset of a plurality of test cases, wherein the subset comprises test cases of the plurality of test cases that are identified as regression suspects for a current build of a compiler, and wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

determining a first instruction count associated with compiling or running of the test case based on the current build of the compiler; and

determining a second instruction count associated with compiling or running of the test case based on a previous build of the compiler;

determining a difference between the second instruction count and the first instruction count; and

adding the test case to the subset based on the difference between the second instruction count and the first instruction count being above a threshold; and

processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions.

14. The computer program product of claim 13 , wherein identifying the subset of the plurality of test cases comprises processing the plurality of test cases in parallel, and wherein processing the subset of the plurality of test cases to identify any test cases associated with confirmed regressions comprises processing the subset of the plurality of test cases sequentially.

15. The computer program product of claim 13 , wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

compiling the test case by the previous build of the compiler;

determining the second instruction count based on the compiling of the test case by the previous build of the compiler;

compiling the test case by the current build of the compiler; and

determining the first instruction count based on the compiling of the test case by the current build of the compiler.

16. The computer program product of claim 13 , wherein the threshold comprises a percentage increase or decrease in the first instruction count with respect to the second instruction count.

17. The computer program product of claim 13 , wherein identifying a test case of the plurality of test cases as belonging to the subset comprises:

running first object code of the test case that was compiled by the previous build of the compiler;

determining the second instruction count based on the running of the first object code;

running second object code of the test case that was compiled by the current build of the compiler; and

determining the first instruction count based on the running of the second object code.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 17, 2019
From: BAGHDADI, GABY
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 050396/0346 →
Continuity (1)
Related Publication 20210081305A1 · Mar 18, 2021