IP Library Granted Patent US 8,549,498
Granted Patent B2
US 8,549,498 · App. 13/215,747 · Granted Oct 1, 2013

Integration of trace selection and trace profiling in dynamic optimizers

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 8,549,498
App. No.
13/215,747
Granted
Oct 1, 2013
Kind
B2
Abstract

Integrated trace selection and profiling in dynamic optimizers may include selecting a trace head based on profile of basic blocks that are executed. The basic blocks executed from the trace head may be recorded as a trace. The trace may be added to a trace nursery in non-compiled state. The trace may be interpreted and profiled until the trace matures. Under a profiling mode, path sensitive runtime information such as values, types, targets of call-sites, and exit frequencies can be collected. The trace may be moved out of the nursery to a compilation queue in response to determining that the trace has matured based on an execution count of the profiled trace.

Claims (36)

1. A method for integrated trace selection and profiling in dynamic optimizers, comprising:

selecting a trace head based on profile of basic blocks that are executed, wherein a basic block is selected as the trace head if a frequency of the basic block invoked exceeds a predetermined threshold that specifies a minimal frequency for the basic block to be selected as a trace head;

recording next executed basic block as tail to the trace head forming a trace and adding the trace in a nursery in non-compiled state; and

interpreting the trace in the nursery and profiling it until the trace matures, the profiling comprising maintaining a frequency of entries to the trace in the nursery and a count for each basic block where an exit has been taken on the trace, and wherein one or more counters associated with one or more basic blocks on the trace are not updated during the interpreting of the trace in the nursery; and

transferring the trace out of the nursery to a compilation queue in response to determining that the trace has matured based on the frequency of entries of the profiled trace.

2. The method of claim 1 , further including performing trace truncation based on information collected from the profiling.

3. The method of claim 2 , wherein the trace truncation includes, for a given basic block x on the trace, if an entry frequency of x on the trace is smaller than a predefined fraction of an entry frequency of the trace, truncating the trace at x.

4. The method of claim 1 , further including reforming the trace based on information collected from the profiling.

5. The method of claim 4 , wherein the reforming the trace includes identifying hot exits of a trace and recording the trace again at the hot exits.

6. The method of claim 1 , further including regrouping the trace based on information collected from the profiling.

7. The method of claim 1 , wherein the profiling collects path-sensitive profiling information.

8. The method of claim 7 , wherein the path-sensitive profiling information includes one or more of values and types of variables, targets of virtual function calls, or execution frequency of basic blocks, or combinations thereof.

9. The method of claim 1 , further including reducing short-lived traces based on information collected from the profiling.

10. The method of claim 1 , wherein the trace matures if the frequency of entries to the trace exceeds a predetermined profiling threshold.

11. A non-transitory computer readable storage medium storing a program of instructions executable by a machine to perform a method of integrated trace selection and profiling in dynamic optimizers, comprising:

selecting a trace head based on profile of basic blocks that are executed, wherein a basic block is selected as the trace head if a frequency of the basic block invoked exceeds a predetermined threshold that specifies a minimal frequency for the basic block to be selected as a trace head;

recording next executed basic block as tail to the trace head forming a trace and adding the trace in a nursery in non-compiled state; and

interpreting the trace in the nursery and profiling it until the trace matures, the profiling comprising maintaining a frequency of entries to the trace in the nursery and a count for each basic block where an exit has been taken on the trace, and wherein one or more counters associated with one or more basic blocks on the trace are not updated during the interpreting of the trace in the nursery; and

transferring the trace out of the nursery to a compilation queue in response to determining that the trace has matured based on the frequency of entries of the profiled trace.

12. The computer readable storage medium of claim 11 , further including performing trace truncation based on information collected from the profiling.

13. The computer readable storage medium of claim 12 , wherein the trace truncation includes, for a given basic block x on the trace, if an entry frequency of x on the trace is smaller than a predefined fraction of an entry frequency of the trace, truncating the trace at x.

14. The computer readable storage medium of claim 11 , further including reforming the trace based information collected from the profiling.

15. The computer readable storage medium of claim 14 , wherein the reforming the trace includes identifying hot exits of a trace and recording the trace again at the hot exits.

16. The computer readable storage medium of claim 11 , further including regrouping the trace based on information collected from the profiling.

17. The computer readable storage medium of claim 11 , wherein the profiling collects path-sensitive profiling information.

18. The computer readable storage medium of claim 17 , wherein the path-sensitive profiling information includes one or more of values and types of variables, targets of virtual function calls, or execution frequency of basic blocks, or combinations thereof.

19. The computer readable storage medium of claim 11 , further including reducing short-lived traces based on information collected from the profiling.

20. The computer readable storage medium of claim 11 , wherein the trace matures if the frequency of entries to the trace exceeds a predetermined profiling threshold.

21. A system for integrated trace selection and profiling in dynamic optimizers, comprising:

a processor;

a memory comprising a nursery and a compilation queue;

a module operable to execute a program code on the processor, the module further operable to select a trace head based on profile of basic blocks that are executed wherein a basic block is selected as the trace head if a frequency of the basic block invoked exceeds a predetermined threshold that specifies a minimal frequency for the basic block to be selected as a trace head, the module further operable to record next executed basic block as tail to the trace head forming a trace and adding the trace in the nursery in non-compiled state, the module further operable to interpret the trace in the nursery, and profile the trace until the trace matures by at least maintaining a frequency of entries to the trace in the nursery and a count for each basic block where an exit has been taken on the trace, and wherein one or more counters associated with one or more basic blocks on the trace are not updated during the interpreting of the trace in the nursery, the module further operable to transfer the trace out of the nursery to the compilation queue in response to determining that the trace has matured based on the frequency of entries of the profiled trace.

22. The system of claim 21 , wherein trace truncation is performed based on information collected from the profiling.

23. The system of claim 22 , wherein the trace truncation includes, for a given basic block x on the trace, if an entry frequency of x on the trace is smaller than a predefined fraction of an entry frequency of the trace, truncating the trace at x.

24. The system of claim 21 , further including reforming the trace based information collected from the profiling.

25. The system of claim 24 , wherein the reforming the trace includes identifying hot exits of a trace and recording the trace again at the hot exits.

Assignments (7)
RELEASE OF SECURITY INTEREST Recorded Aug 31, 2018
From: BARCLAYS BANK PLC, AS ADMINISTRATIVE AGENT
To: CSP TECHNOLOGIES NORTH AMERICA, LLC (F/K/A CV HOLDINGS, L.L.C.); TOTAL INNOVATIVE PACKAGING, INC.; CAPITOL PLASTIC PRODUCTS, L.L.C.; CSP TECHNOLOGIES, INC.; CAPITOL CUPS, INC.; CV PARTNERS
Reel/Frame 046991/0095 →
CONVEYOR IS ASSIGNING UNDIVIDED 50% INTEREST Recorded Jan 12, 2018
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: SERVICENOW, INC.; INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 045059/0456 →
SECURITY INTEREST Recorded Apr 13, 2015
From: CAPITOL CUPS, INC.; TOTAL INNOVATIVE PACKAGING, INC.; CSP TECHNOLOGIES NORTH AMERICA, LLC (F/K/A CV HOLDINGS, LLC); CAPITOL PLASTIC PRODUCTS, L.L.C.; CV PARTNERS
To: BARCLAYS BANK PLC, AS ADMINISTRATIVE AGENT
Reel/Frame 035421/0366 →
CHANGE OF NAME Recorded Mar 19, 2015
From: CV HOLDINGS, L.L.C.
To: CSP TECHNOLOGIES NORTH AMERICA, LLC
Reel/Frame 035225/0593 →
RELEASE OF SECURITY INTEREST Recorded Feb 26, 2015
From: CYPRIUM INVESTORS IV LP
To: CV HOLDINGS, L.L.C; CAPITOL CUPS, INC.; CAPITOL MEDICAL DEVICES, INC.; CAPITOL PLASTIC PRODUCTS, L.L.C.; CSP TECHNOLOGIES, INC.; CV PARTNERS; TOTAL INNOVATIVE PACKAGING, INC.
Reel/Frame 035105/0796 →
SECURITY AGREEMENT Recorded Jan 10, 2014
From: CSP TECHNOLOGIES, INC.
To: CYPRIUM INVESTORS IV LP, AS ADMINISTRATIVE AGENT
Reel/Frame 031968/0321 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2011
From: HAYASHIZAKI, HIROSHIGE; INOUE, HIROSHI; WU, PENG
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 026792/0837 →