Use of run-time code generation to create speculation recovery code in a computer system
AssigneeHewlett-Packard Company
InventorWilliam B. Buzbee
Life of this patent
Estimating the term…
Abstract
In a computer system, programming code includes speculative code. The speculative code is code which is executed early based on speculation that the results from execution of the speculative code will be needed in the future. When executing instructions within a speculative sequence of code which includes memory accesses, any memory faults are ignored. When utilizing data generated during the speculative sequence of code a determination is made as to whether any memory fault occurred when the speculative sequence of code was executed. If it is determined that a memory fault occurred when the speculative sequence of code was executed, recovery code is generated which when executed performs a recovery from the memory fault.
Claims18
A method for executing on a computing system, programming code which includes speculative code which is speculatively executed, the method comprising the steps of:
- (a) executing a speculative sequence of code, including the following substep:
- (a.1) for instructions within the speculative sequence of code which include memory accesses, ignoring memory faults;
- and,
- (b) when utilizing data generated during the speculative sequence of code at runtime, performing the following substeps:
- (b.1) determining whether any memory fault occurred when the speculative sequence of code was executed, and
- (b.2) when in substep (b.1) it is determined that a memory fault occurred when the speculative sequence of code was executed, performing the following substep:
- (b.2.1) generating recovery code which when executed performs a recovery from the memory fault.
Storage media which stores software which when executed on a computing system performs a method for executing programming code which includes speculative code which is speculatively executed, the method comprising the steps of:
- (a) executing a speculative sequence of code, including the following substep:
- (a.1) for instructions within the speculative sequence of code which include memory accesses, ignoring memory faults;
- and,
- (b) when at runtime utilizing data generated during the speculative sequence of code, performing the following substeps:
- (b.1) determining whether any memory fault occurred when the speculative sequence of code was executed, and
- (b.2) when in substep (b.1) it is determined that a memory fault occurred when the speculative sequence of code was executed, performing the following substep:
- (b.2.1) generating recovery code which when executed performs a recovery from the memory fault.
A computing system comprising:
- programming code which includes speculative code which is speculatively executed;
- an executing means for executing the programming code, the programming code being optimized so that for instructions within the speculative sequence of code which include memory accesses, memory faults are ignored;
- and,
- a dynamic translator which at runtime generates recovery code for a memory fault, the memory fault occurring when the speculative sequence of code is executed and the memory fault being discovered when utilizing data generated during execution of the speculative sequence of code;
- wherein the recovery code performs a recovery from the memory fault when executed by the executing means.
Dependencies are inferred from the claim text.