IP Library Granted Patent US 7,617,421
Granted Patent B2
US 7,617,421 · App. 11/495,452 · Granted Nov 10, 2009

Method and apparatus for reporting failure conditions during transactional execution

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,617,421
App. No.
11/495,452
Granted
Nov 10, 2009
Kind
B2
Abstract

One embodiment of the present invention provides a system that reports reasons for failure during transactional execution. During operation, the system transactionally executes a block of instructions in a program. If the transactional execution of the block of instructions completes successfully, the system commits changes made during the transactional execution, and resumes normal non-transactional execution of the program past the block of instructions. Otherwise, if transactional execution of the block of instructions fails, the system discards changes made during the transactional execution, and records failure information indicating why the transactional execution failed.

Claims (70)

1. A method for reporting reasons for failure during transactional execution, comprising:

while executing a program on a processor, transactionally executing a block of instructions in the program;

if the transactional execution of the block of instructions completes successfully,

committing changes made during the transactional execution, and

resuming normal non-transactional execution of the program past the block of instructions; and

if the transactional execution of the block of instructions fails,

discarding changes made during the transactional execution, and

whenever a pipe clear operation occurs on the processor, recording failure information indicating why the transactional execution failed;

wherein the failure information contains an “exogenous flag,” which indicates whether the information was recorded during transactional execution or during execution of “exogenous code” from outside of transactional program execution.

2. The method of claim 1 , wherein if the transactional execution of the block of instructions fails, the method further comprises resuming execution at an address which is specified by an instruction which staffed the transactional execution of the block of instructions.

3. The method of claim 1 , wherein if the transactional execution of the block of instructions fails, the method further comprises:

determining from the failure information whether it is advantageous to re-execute the block of instructions; and

if so, re-executing the block of instructions.

4. The method of claim 1 , wherein recording the failure information involves recording the failure information in a transaction-status register (TSR).

5. The method of claim 4 , wherein information contained in the TSR specifies whether recording of the failure information has been disabled or is not supported by the processor.

6. The method of claim 1 , wherein the failure information includes one or more of the following:

a flag indicating that a coherency violation caused the transactional execution to fail, wherein the coherency violation indicates that another process interfered with the transactional execution;

a flag indicating whether a fail instruction caused the transactional execution to fail;

a flag indicating whether an instruction disallowed during transactional execution caused the transactional execution to fail;

a flag indicating whether a precise trap caused the transactional execution to fail;

a flag indicating whether an asynchronous trap caused the transactional execution to fail;

a flag indicating whether a deferred-queue-full condition caused the transactional execution to fail;

a flag indicating whether a load instruction caused the transactional execution to fail;

a flag indicating whether a store instruction caused the transactional execution to fail;

a flag indicating whether a control-transfer instruction (CTI) caused the transactional execution to fail; and

a flag indicating whether a floating-point instruction caused the transactional execution to fail.

7. The method of claim 6 , wherein the fail instruction is a variation of a trap instruction which causes the transactional execution to fail.

8. An apparatus that reporting reasons for failure during transactional execution, comprising:

a transactional-execution mechanism within a processor, wherein the transactional-execution mechanism is configured to transactionally execute a block of instructions in a program;

wherein if the transactional execution of the block of instructions completes successfully, the transactional-execution mechanism is configured to,

commit changes made during the transactional execution, and to

resume normal non-transactional execution of the program past the block of instructions; and

wherein if the transactional execution of the block of instructions fails, the transactional-execution mechanism is configured to,

discard changes made during the transactional execution, and

whenever a pipe clear operation occurs on the processor, to record failure information indicating why the transactional execution failed;

wherein the failure information contains an “exogenous flag,” which indicates whether the information was recorded during transactional execution or during execution of “exogenous code” from outside of transactional program execution.

9. The apparatus of claim 8 , wherein if the transactional execution of the block of instructions fails, the transactional-execution mechanism is configured to resume execution at an address which is specified by an instruction which staffed the transactional execution of the block of instructions.

10. The apparatus of claim 8 , wherein if the transactional execution of the block of instructions fails, the transactional-execution mechanism is configured to:

determine from the failure information whether it is advantageous to re-execute the block of instructions; and

if so, to re-execute the block of instructions.

11. The apparatus of claim 8 , wherein the transactional-execution mechanism is configured to record the failure information in a transaction-status register (TSR).

12. The apparatus of claim 11 , wherein information contained in the TSR specifies whether recording of the failure information has been disabled or is not supported by the processor.

13. The apparatus of claim 8 , wherein the failure information includes one or more of the following:

a flag indicating that a coherency violation caused the transactional execution to fail, wherein the coherency violation indicates that another process interfered with the transactional execution;

a flag indicating whether a fail instruction caused the transactional execution to fail;

a flag indicating whether an instruction disallowed during transactional execution caused the transactional execution to fail;

a flag indicating whether a precise trap caused the transactional execution to fail;

a flag indicating whether an asynchronous trap caused the transactional execution to fail;

a flag indicating whether a deferred-queue-full condition caused the transactional execution to fail;

a flag indicating whether a load instruction caused the transactional execution to fail;

a flag indicating whether a store instruction caused the transactional execution to fail;

a flag indicating whether a control-transfer instruction (CTI) caused the transactional execution to fail; and

a flag indicating whether a floating-point instruction caused the transactional execution to fail.

14. The apparatus of claim 13 , wherein the fail instruction is a variation of a trap instruction which causes the transactional execution to fail.

15. A computer system that reports reasons for failure during transactional execution, comprising:

a processor;

a memory; and

a transactional-execution mechanism within the processor, wherein the transactional-execution mechanism is configured to transactionally execute a block of instructions in a program;

wherein if the transactional execution of the block of instructions completes successfully, the transactional-execution mechanism is configured to,

commit changes made during the transactional execution, and to

resume normal non-transactional execution of the program past the block of instructions; and

wherein if the transactional execution of the block of instructions fails, the transactional-execution mechanism is configured to,

discard changes made during the transactional execution, and

whenever a pipe clear operation occurs on the processor, to record failure information indicating why the transactional execution failed;

wherein the failure information contains an “exogenous flag,” which indicates whether the information was recorded during transactional execution or during execution of “exogenous code” from outside of transactional program execution.

16. The computer system of claim 15 , wherein if the transactional execution of the block of instructions fails, the transactional-execution mechanism is configured to resume execution at an address which is specified by an instruction which started the transactional execution of the block of instructions.

17. The computer system of claim 15 , wherein if the transactional execution of the block of instructions fails, the transactional-execution mechanism is configured to:

determine from the failure information whether it is advantageous to re-execute the block of instructions; and

if so, to re-execute the block of instructions.

18. The computer system of claim 15 , wherein the transactional-execution mechanism is configured to record the failure information in a transaction-status register (TSR).

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037305/0133 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 27, 2006
From: CAPRIOLI, PAUL; YIP, SHERMAN H.; CHAUDHRY, SHAILENDER
To: SUN MICROSYSTEMS, INC.
Reel/Frame 018110/0286 →