Compiler technique for efficient register checkpointing to support transaction roll-back
AssigneeIntel Corporation
InventorsCheng Wang, Youfeng Wu
Life of this patent
Estimating the term…
Abstract
A method and apparatus for efficient register checkpointing is herein described. A transaction is detected in program code. A recovery block is inserted in the program code to perform recovery operations in response to an abort of the first transaction. A roll-back edge is potentially inserted from an abort point to the recovery block. A control flow edge is inserted from the recovery block to a entry point of the transaction. Checkpoint code is inserted before the entry point to backup live-in registers in backup storage elements and recovery code is inserted in the recovery block to restore the live-in registers from the backup storage elements in response to an abort of the transaction.
Claims20
A tangible, computer-readable medium including program code which, when executed by a computing device, causes the computing device to:
- detect a first transaction to be executed by a first thread of a processing system of the computing device;
- determine a first storage element associated with the first transaction to be checkpointed;
- insert a first operation in the first transaction to store an original value to be held in the first storage element to a second storage element;
- insert a second operation in the first transaction to restore the original value from the second storage element to the first storage element in response to an abort event in the first transaction;
- determine a live-in operation is to be performed before the first transaction, wherein the result of the live-in operation is to be held in the first live-in storage element;
- determine the live-in operation is also to be performed in the first transaction and the result of the live-in operation is to be held in a third storage element;
- and
- replace the live-in operation in the first transaction with a third operation to copy the result of the live-in operation to be held in the first live-in storage element to the third storage element in response to determining the live-in operation is to be performed before the first transaction, the live-in operation is also to be performed in the first transaction, and the result of the live-in operation is to be held in a third storage element.
A computing device comprising:
- a processor;
- and
- a memory device electrically coupled to the processor, the memory device having stored therein a plurality of instructions, which when executed by the processor cause the processor to:
- detect a first transaction;
- determine a first storage element associated with the first transaction to be checkpointed;
- insert a first operation to store an original value to be held in the first storage element to a second storage element;
- insert a second operation to restore the original value from the second storage element to the first storage element in response to an abort event in the first transaction;
- insert a live-in operation is to be performed before the first transaction, wherein the result of the live-in operation is to be held in the first live-in storage element;
- determine the live-in operation is also to be performed in the first transaction and the result of the live-in operation is to be held in a third storage element;
- and
- replace the live-in operation in the first transaction with a third operation to copy the result of the live-in operation to be held in the first live-in storage element to the third storage element in response to determining the live-in operation is to be performed before the first transaction, the live-in operation is also to be performed in the first transaction, and the result of the live-in operation is to be held in a third storage element.
A tangible, computer-readable medium including program code which, when executed by a machine, causes the machine to:
- execute a compiler to compile program code, wherein the compiler in response to being executed performs the operations of:
- inserting a first operation at a transaction entry point in a first transaction, the first operation to copy an original value to be stored in a first storage element associated with the first transaction to a second storage element;
- inserting a second operation at a recover point in the first transaction, the second operation to copy the original value from the second storage element to the first storage element;
- and
- inserting a third operation to direct a program flow to the transaction entry point after execution of the second operation.
Dependencies are inferred from the claim text.