Patent ID: 7346741

Claim:
A machine-implemented method for retrieving instructions, comprising the steps of: monitoring characteristics of a pre-fetch buffer to determine whether to adjust a configurable stride value, wherein the pre-fetch buffer stores instructions that are anticipated to be requested in the future, wherein the characteristics of the pre-fetch buffer comprise: a number of hits to the pre-fetch buffer that are not hits to a first level cache; a ratio of hits to the pre-fetch buffer to lines of instructions installed in the pre-fetch buffer; and how many explicit requests for lines of instructions are currently being pre-fetched, but have not yet been retrieved from memory; in response to a determination to adjust the configurable stride value, determining whether to increase or decrease the configurable stride value based on the characteristics; receiving an indication that an instruction requested by an instruction execution component is not present in the first level cache, and wherein the instruction is in a first line of instructions; determining, based upon the configurable stride value, a subsequent line of instructions to retrieve, wherein the subsequent line of instructions is X lines of instructions after the first line of instruction, wherein X is an integer, and wherein the value of X depends upon the configurable stride value; and retrieving the subsequent line of instructions, wherein the subsequent line of instructions is retrieved in anticipation of being requested in the future.