IP Library › Granted Patent US 7,895,421
Granted Patent B2
US 7,895,421 · App. 11/776,986 · Granted Feb 22, 2011

Mechanism for using performance counters to identify reasons and delay times for instructions that are stalled during retirement

Assignee: GLOBALFOUNDRIES Inc.
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,895,421
App. No.
11/776,986
Granted
Feb 22, 2011
Kind
B2
Abstract

A system and method of accounting for lost clock cycles in a microprocessor. A method includes detecting a first reason which prevents exit of an entry from an instruction retirement queue, and incrementing a first count corresponding to the first reason, wherein the first count is incremented while the first reason prevents exit of the entry from the queue. A first point in time is determined when said first reason no longer prevents exit of the entry from the queue. A second reason which prevents exit of the entry from the queue is detected, wherein the second reason came into existence prior to said first point in time. A second count corresponding to the second reason is incremented, wherein incrementing the second count begins at the first point in time.

Claims (40)

1. A method comprising:

detecting a first reason which prevents exit of an entry from an instruction retirement queue;

incrementing a first count corresponding to the first reason, wherein the first count is incremented while the first reason prevents exit of the entry from the instruction retirement queue;

determining a first point in time when said first reason no longer prevents exit of the entry from the instruction retirement queue;

detecting a second reason which prevents exit of the entry from the instruction retirement queue, wherein the second reason came into existence prior to said first point in time; and

incrementing a second count corresponding to the second reason, wherein incrementing the second count begins at the first point in time.

2. The method as recited in claim 1 , wherein the first count represents a contribution of the first reason for a delay of exit of the entry from the instruction retirement queue, and the second count represents a contribution of the second reason for the delay.

3. The method as recited in claim 2 , further comprising assigning highest priority to an oldest entry in said instruction retirement queue.

4. The method as recited in claim 3 , further comprising operating pipeline coupled to the instruction retirement queue in a superscalar microarchitecture comprising out-of-order and parallel execution of operations of a processor.

5. The method as recited in claim 4 , further comprising operating said instruction retirement queue as a superscalar reorder buffer that retires said operations in-order.

6. The method as recited in claim 1 , wherein said first reason and said second reason are selected from one of a branch misprediction, an i-TLB miss, and i-cache miss, a long dispatch, a dependency between instructions, a d-TLB miss, or d-cache miss.

7. A system comprising:

an instruction pipeline;

an instruction retirement queue; and

a performance monitor coupled to the instruction pipeline and the instruction retirement queue, wherein the performance monitor is configured to:

detect a first reason which prevents exit of an entry from the instruction retirement queue;

increment a first count corresponding to the first reason, wherein the first count is incremented while the first reason prevents exit of the entry from the instruction retirement queue;

determine a first point in time when said first reason no longer prevents exit of the entry from the instruction retirement queue;

detect a second reason which prevents exit of the entry from the instruction retirement queue, wherein the second reason came into existence prior to said first point in time; and

increment a second count corresponding to the second reason, wherein incrementing the second count begins at the first point in time.

8. The system as recited in claim 7 , wherein the first count represents a contribution of the first reason for a delay of exit of the entry from the instruction retirement queue, and the second count represents a contribution of the second reason for the delay.

9. The system as recited in claim 8 , wherein an entry in said instruction retirement queue is configured to store an entity being processed by the instruction pipeline and an associated status of the entity.

10. The system as recited in claim 9 , wherein the instruction retirement queue is configured to assign highest priority to the oldest entry.

11. The system as recited in claim 7 , wherein the instruction pipeline is configured to operate in a superscalar microarchitecture comprising out-of-order and parallel execution of instructions of a processor.

12. The system as recited in claim 11 , wherein the instruction retirement queue is further configured to operate as a superscalar reorder buffer.

13. The system as recited in claim 7 , wherein said first reason and said second reason are selected from one of a branch misprediction, an i-TLB miss, and i-cache miss, a long dispatch, a dependency between instructions, a d-TLB miss, or d-cache miss.

14. The system as recited in claim 13 , wherein the performance monitor is configured to use existing hardware resources in the pipeline to determine IPC loss in the pipeline.

15. An performance monitor comprising:

an interface configured to communicate with a pipeline including an instruction retirement queue;

a first counter;

a second counter; and

a control unit, wherein the control unit is configured to:

detect a first reason which prevents exit of an entry from the instruction retirement queue;

increment a first count corresponding to the first reason, wherein the first count is incremented while the first reason prevents exit of the entry from the instruction retirement queue;

determine a first point in time when said first reason no longer prevents exit of the entry from the instruction retirement queue;

detect a second reason which prevents exit of the entry from the instruction retirement queue, wherein the second reason came into existence prior to said first point in time; and

increment a second count corresponding to the second reason, wherein incrementing the second count begins at the first point in time.

16. The performance monitor as recited in claim 15 , wherein the control unit is further configured to detect a condition of an unsuccessful exit from said instruction retirement queue of only an entry which has a highest priority according to said instruction retirement queue.

17. The performance monitor as recited in claim 15 , wherein the control unit is further configured to detect said first and second reason to be one of a branch misprediction, i-TLB miss, i-cache miss, a long dispatch, a dependency between instructions, or a d-TLB or d-cache miss.

18. The performance monitor as recited in claim 15 , wherein the instruction retirement queue comprises a reorder buffer.

Assignments (6)
RELEASE OF SECURITY INTEREST Recorded May 12, 2021
From: WILMINGTON TRUST, NATIONAL ASSOCIATION
To: GLOBALFOUNDRIES U.S. INC.
Reel/Frame 056987/0001 →
RELEASE OF SECURITY INTEREST Recorded Nov 20, 2020
From: WILMINGTON TRUST, NATIONAL ASSOCIATION
To: GLOBALFOUNDRIES INC.
Reel/Frame 054636/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 2, 2020
From: GLOBALFOUNDRIES INC.
To: GLOBALFOUNDRIES U.S. INC.
Reel/Frame 054633/0001 →
SECURITY AGREEMENT Recorded Nov 29, 2018
From: GLOBALFOUNDRIES INC.
To: WILMINGTON TRUST, NATIONAL ASSOCIATION
Reel/Frame 049490/0001 →
AFFIRMATION OF PATENT ASSIGNMENT Recorded Aug 18, 2009
From: ADVANCED MICRO DEVICES, INC.
To: GLOBALFOUNDRIES INC.
Reel/Frame 023120/0426 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 23, 2007
From: QUACH, NHON; LIE, SEAN
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 019632/0178 →
Continuity (1)
Related Publication 20090019317A1 · Jan 15, 2009