# Patent

## Title
Improving hit rate of code translation redirection table with replacement strategy based on usage history table of evicted entries

## Abstract

In one embodiment, a micro-processing system includes a hardware structure disposed on a processor core. The hardware structure includes a plurality of entries, each of which are associated with portion of code and a translation of that code which can be executed to achieve substantially equivalent functionality. The hardware structure includes a redirection array that enables, when referenced, execution to be redirected from a portion of code to its counterpart translation. The entries enabling such redirection are maintained within or evicted from the hardware structure based on usage information for the entries.

## Background
BACKGROUND
Modern microprocessors employ a wide variety of strategies to improve processing and execution. One category of improvements involves translating instructions of a given instruction set architecture (ISA). Translated versions of ISA code can offer various performance benefits relative to the non-translated ISA instructions when executed by the microprocessor. In some cases, systems with translations are inefficient in the way that they provide the processing pipeline with access to translated code. For example, some systems may persist in a state in which valuable, frequently-executed translations are relatively more difficult to access than translations providing lesser benefits.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 shows a micro-processing system according to an embodiment of the present disclosure.
FIG. 2 schematically depicts a micro-processing system with an on-core hardware structure and related components that facilitate the redirection of execution from a code portion to a corresponding translation of that code portion which achieves substantially equivalent functionality. The figure further depicts maintaining or evicting redirection entries in the hardware structure based on their usage.
FIG. 3 shows an example process flow of a method, in a processing pipeline, for alternatively processing in a translation mode or in a hardware decoder mode.
FIG. 4 shows another example process flow of a method, in a processing pipeline, for alternatively processing in a translation mode or in a hardware decoder mode.



DETAILED DESCRIPTION
The present disclosure provides a mechanism for efficiently managing the retrieval and execution of translations of corresponding code portions, such as target ISA code portions. The intelligent generation of translations, and the optimization thereof, may be handled by a dynamic binary translator, which may be included as part of a software layer that provides an interface between an ISA and the processor core. The disclosure further describes a multiplexed processing pipeline, in which the microprocessor uses an on-core hardware structure to efficiently retrieve and execute translated versions of corresponding ISA code. The hardware structure may also be variously referred to herein as the “hardware redirector.”
The translations, when accessed via the hardware redirector, are executed in lieu of the corresponding code and provide substantially equivalent functionality. Once retrieved, these translations may be executed in the processing pipeline without using the microprocessor's hardware decoder. When this disclosure refers to execution “without using the hardware decoder,” that language may still encompass minor or trivial uses of the hardware decoder while a translation is being executed. Alternatively, if a translation has not been created or is not accessible, target code may be received into and processed by a hardware decoder to generate instructions native to and executable by execution logic/mechanisms of the microprocessor. The described execution of a translation without the hardware decoder will be referred to herein as a “translation mode” of execution, in contrast to the “hardware decoder mode” described above, in which full hardware decoder functionality is used to decode target ISA instructions into native instructions. Circumventing the hardware decoder (i.e., by executing a translation) in many cases will improve speed of execution, reduce power consumption, and provide various other benefits.
Although various references to a “multiplexed” processing pipeline are described herein, it will be understood that the term refers to the processing pipeline being configured to alternately provide (e.g., multiplex) multiple operating modes (e.g., translation mode vs. hardware decoder mode). As such, it will be further understood that the pipeline may employ logic instead of, or in addition to, multiplexing logic in order to provide the features described herein.
Over time, translations that are frequently and/or recently requested are indexed by, and incorporated into, the hardware redirector provided on the processor core. Each entry in the hardware redirector is associated with a translation, and provides redirection information that enables the microprocessor, during a fetch operation for a selected code portion, to cause execution to be redirected away from that code portion and to its associated translation. If a code portion has an entry in the hardware structure (a “hit”), the associated translation is executed in the translation mode (i.e., without the hardware decoder). If the reference to the hardware structure “misses” (i.e., there is no entry for the code portion), then the code portion is executed in the hardware decoder mode using the hardware decoder.
Over time, the micro-processing system may generate a large number of translations. In order to save on processor die area and to provide rapid lookups, the hardware redirector may be of limited size. It is therefore desirable that it be populated with entries providing redirection for the most “valuable” translations, such as translations that are more frequently and/or recently used. In other words, it is typically desirable that references to the hardware redirector have as high a hit rate as possible.
To maximize hit rates and provide efficient and quick access to valuable translations, the hardware redirector includes usage information associated with the entries that are present in the structure. This usage information varies in response to entries in the hardware structure being used to redirect execution. Maximizing hit rates may be achieved by maintaining or evicting entries from the hardware structure based on this usage information.
Depending on the overall design of the system, a miss on the hardware redirector can mean (1) that a translation has not been generated for a particular code portion; or (2) that a translation has been generated, but is not accessible via interaction with the hardware redirector. The scenario of (2) may result, for example, in the case of a translation that is “less available” due to it being used less frequently and/or less recently than other translations. In this example, and as described throughout, the population of entries in the hardware redirector is dynamically and intelligently controlled to maximize hit rate of the hardware redirector.
FIG. 1 schematically depicts a micro-processing system 100 including a microprocessor/core 102 and associated software and memory system that may be employed in connection with the systems and methods described herein. In particular, the depicted system may be implemented to efficiently make use of the multiplexing strategy described above, and that will be further described below in connection with various examples.
Microprocessor 102 variously includes and/or may communicate with various memory and storage locations 110, which may include processor registers 112, an L1 processor cache 114, an L2 processor cache 116, an L3 processor cache 118, main memory 120 (e.g., one or more DRAM chips), secondary storage 122 (e.g., magnetic and/or optical storage units) and/or tertiary storage 124 (e.g., a tape farm). Some or all of these locations may be memory-mapped, though in some implementations the processor registers may be mapped differently than the other locations, or may be implemented such that they are not memory-mapped. The L1-L3 caches may or may not be on the processor die/core, though in many cases at least the L1 cache will be on the processor core. It will be understood that the memory/storage components are listed above in increasing order of access time and capacity, though there are possible exceptions. A memory controller 126 may be used to handle the protocol and provide the signal interface required of main memory 120, and, typically, to schedule memory accesses. The memory controller can be implemented on the processor die or on a separate die. It is to be understood that the locations set forth above are non-limiting and that other memory/storage locations may be used without departing from the scope of this disclosure.
Microprocessor 102 is configured to execute instructions that generally are described and defined by an ISA that is native to the processor. In the present description, native instructions are generated in two different ways. The first way involves a hardware decoder receiving target ISA instructions and generating native instructions from those target ISA instructions. The second way is to generate an optimized native translation of target ISA instructions, typically via a dynamic binary translator (e.g., shown at 140). These translations provide substantially equivalent functionality, but they are optimized and are executed without the need of the hardware decoder.
Regardless of the particular ISA, the described multiplexing mechanism may be employed to efficiently retrieve and execute ISA code portions or corresponding translations of those code portions. Microprocessor 102 may be configured to execute various instruction set architectures, which may be characterized as complex instruction sets (CISC architecture), reduced instruction sets (RISC architecture), and/or VLIW architectures. Furthermore, it is possible that a given instruction set may have characteristics associated with more than one of these regimes. In addition, some instruction sets that are thought of as CISC implementations may in fact be executed on microprocessor 102 in a RISC-like fashion. For example, the widely employed x86 architecture, though considered a CISC system, is often implemented in a manner that is more associated with a pipelined RISC implementation. Again, regardless of the particular ISA or its characteristics, the present disclosure provides a way of efficiently utilizing translations of the ISA code portions.
Instantiation of code as a series of processor-recognized instructions (i.e., ISA instructions) may entail compiling code of an operating system, application, driver, etc. to produce binary code that is executed by microprocessor 102. During compilation or post-processing operations, VLIW-type techniques may be employed (e.g., in a software layer) to effect various optimizations. In some cases, these software optimizations are employed so that the microprocessor can execute instructions in program order without the need for the complex hazard detection and avoidance/mitigation hardware that are present in many CISC and RISC execution pipelines. That said, in some cases software and/or decode and execution hardware may be employed to perform dynamic optimization and hazard avoidance in lieu of, or in addition to, VLIW techniques.
The microprocessor further includes a processing pipeline which typically includes fetch logic 128, decode logic 130, execution logic 132, mem logic 134, and writeback logic 136. Fetch logic 128 retrieves instructions from one or more of locations 110 (but typically from either unified or dedicated L1 caches backed by L2-L3 caches and main memory).
Decode logic 130 decodes the instructions, for example, by parsing opcodes, operands, and addressing modes. Upon being parsed, the instructions are then executed by execution logic 132. As mentioned above and as will be described in greater detail below, processor 102 may be configured to, when in a translation mode, execute translations of target ISA instructions via execution logic 132 without first decoding such instructions with a hardware decoder such as decode logic 130.
For operations that produce a primary result (e.g., as opposed to those that perform a branch to another location in the executing program), writeback logic 136 writes the result to an appropriate location, such as a processor register. In load/store architectures, mem logic 134 performs load and store operations, such as loading an operand from main memory into a processor register.
It should be understood that the above five stages are somewhat specific to, and included in, a typical RISC implementation. More generally, a microprocessor may include fetch, decode, and execution logic, with mem and writeback functionality being carried out by the execution logic. The present disclosure is equally applicable to these and other microprocessor implementations.
In the described examples, instructions may be fetched and executed one at a time, possibly requiring multiple clock cycles. During this time, significant parts of the data path may be unused. In addition to, or instead of, single instruction fetching, pre-fetch methods may be used to improve performance and avoid latency bottlenecks associated with read and store operations (i.e., the reading of instructions and loading such instructions into processor registers and/or execution queues). In addition, the exemplary microprocessor may be pipelined to exploit instruction level parallelism and better utilize the data path so that there are multiple instructions in different stages of execution at the same time. Still further, fetch logic 128, decode logic 130, execution logic 132, etc., may be individually pipelined with multiple logic stages to improve performance.
Storage locations 110 may include a secure/private memory allocation accessible by microprocessor 102 during execution of native ISA instructions. This memory allocation may, for example, be used for execution of software layer 138 (FIG. 1) and storage of associated data. Of particular relevance to the present discussion is a library of translations that have been generated from corresponding blocks of target ISA code. These translations may vary in length and the extent to which they have been optimized.
FIG. 2 shows an embodiment of a system 200 for selectively providing hardware decoder execution and dynamic binary translation execution via processing pipeline 202. The processing pipeline is shown in simplified form, and includes fetch logic 204, hardware decoder 206 and execution logic 208. System 200 includes an on-core hardware redirector 210 having a plurality of entries 212, each of which are associated with a translation of a corresponding code portion. The hardware redirector includes N entries in the present example, though it will be appreciated that it may have any practicable size.
Each translation referenced by the hardware redirector can be executed in lieu of its corresponding code portion to achieve substantially equivalent functionality. As previously described, the translated code may be intelligently generated via a software-based dynamic binary translator (e.g., dynamic binary translator 140 of FIG. 1), and may be optimized in various ways (e.g., using register renaming, loop transformations, reordering of operations, grouping and consolidation of instructions and micro-operations, etc.). These are non-limiting examples—code translations may be implemented in a variety of other ways.
The hardware redirector includes a redirection array 220 that includes, for each entry, redirection information 222 that the system can use to redirect execution from a selected code portion to its corresponding translation. Such information may be used, for example, during a fetch operation 230 performed by fetch logic 204.
In the depicted example, the redirection information is implemented as an address mapping between the address of a target ISA code portion (232) and the address of its corresponding translation (234). During the fetch operation, a lookup may be performed on redirection array 220. If the target ISA address being fetched is present in the array, the fetch operation proceeds using the address of the translation. This enables processing pipeline to redirect to the translation, and execute it in the execution logic without using the hardware decoder (i.e. in the translation mode of execution). Alternatively, if the address for the target ISA code portion is not present in the array, the code portion is executed in the hardware decoder mode using hardware decoder 206. In examples using address mapping, hashed forms of address may also be used in connection with the entries in the hardware redirector. Address mapping is but one example; this disclosure encompasses any suitable on-core hardware mechanism for enabling execution to be redirected to a translation from its corresponding code portion.
Hardware redirector 210 further includes an access array 240 that includes usage information that varies in response to entries 212 being used to redirect execution to translations. As described in more detail below, the depicted system uses the usage information to control whether specific entries are maintained within or evicted from the hardware redirector. The usage information may take various forms, though it is implemented in the present example as a per-entry access bit 242. The access bit is a binary indication of whether its associated entry in the hardware redirector has been used to redirect execution to a translation. In other examples, usage information may be encoded to cover multiple entries in the hardware redirector, instead of encoding information for individual entries.
System 200 further includes management software 250 which interacts with the hardware redirector and a usage history data structure 252. Among other things, the purpose of this interaction is to dynamically control the population of specific entries in the hardware redirector. The management software may repeatedly sample the usage information in access array 240, and may use those samples to store and analyze information relating to entries in the hardware redirector. The analysis is performed in order to determine whether specific entries are maintained or evicted from the hardware redirector. This may be performed, for example, based on how recently and/or frequently those entries have been used to redirect execution to a translation.
With respect to evicted entries, history information typically will be retained in usage history data structure 252, in addition to the currently active entries. As a result of subsequent analysis (e.g., by the depicted management software), evicted entries may at some point be re-inserted into the hardware redirector.
Indeed, FIG. 2 shows the storage of history information for entries that are not present in the hardware redirector. History data structure 252 has more entries than the hardware redirector (N+X>N), reflecting the typical situation where the system has generated more translations than there are slots in the hardware redirector. Translations provide faster and/or more efficient operation, however identifying and retrieving a given translation from a large lookup structure may offset any such benefits. For example, with a large number of translations, attempts to look up and retrieve translations using the target instruction pointer may be relatively slow. The numbering 1 through N in the hardware redirector and 1 through N+X in structure 252 is not intended to imply any sequence or contiguous ordering. It merely is an indication that usage information may be stored for a larger number of translations than there are entries in the hardware redirector.
Returning now to the specific example using access bits 242, the access bit for a particular entry may be set whenever the entry is used to redirect execution. Between times when it is set, the bit may be cleared by hardware or by management software 250. In one example, the management software repeatedly samples and clears the access bit for the entries in the hardware director. This may occur at regular intervals, such as every M clock cycles (e.g., every 1000 cycles) or in connection with some other recurring event (e.g., timer interrupt). The management software may then create a history of the value of the access bit over time and store that history in usage history data structure 252. This history may then be analyzed using a wide variety of methods, in order to increase the hit rate on hardware redirector 210. Again, the analysis performed by management software 250 will typically include assessment of how frequently and/or how recently entries have been used to redirect execution, which in turn is used to control whether specific entries are maintained in or evicted from the hardware redirector.
The systems herein may employ usage information other than access bits. Whether encoded in access array 240 or stored in various forms in usage history data structure 252, the usage information may include a count of how many times an entry has been used to redirect execution. For example, counters may be employed in hardware redirector 210 and/or usage history data structure for one or more of the entries. The usage information may further include identification of a time when an entry was used to redirect execution.
In FIG. 2, the management software is depicted separately from processing pipeline 202. However, this code may execute in various locations and/or be associated with various components depicted in FIGS. 1 and 2. In one example, the management code runs on processing pipeline 202, and accesses the hardware redirector and the usage history data structure depicted in FIG. 2.
Regardless of the particular configuration, providing redirection and usage information in a hardware structure can provide significant benefits. Queries to the hardware redirector can happen in the front end of the pipeline as the processor is fetching code along the main execution path. If redirection were instead implemented as a software structure, a subroutine would need to be called to perform lookup instead of directly continuing along the main execution path. The hardware redirector thus provides a mechanism for rapid and easy access to high-value translations.
Turning now to FIGS. 3 and 4, the figures show example methods and process flows in which hardware-accessible entries of redirection information are managed. The methods may be implemented with any suitable software/hardware, including configurations other than those shown in the foregoing examples. In some cases, however, the process flows may reference components and processes that have already been described. For purposes of clarity and minimizing repetition, it may be assumed that these components/processes are similar to the previously described examples.
FIG. 3 depicts an example method 300 of alternately processing in the previously described modes, i.e., a hardware decoder mode or a translation mode. At 302, the method includes generating a plurality of translations, using a dynamic binary translator or through another suitable method. At 304, the method includes populating an on-core hardware structure with a plurality of inserted entries. Each entry is associated with one of the translations generated at step 302, and includes redirection information that enables execution to be redirected from a non-translated code portion to its translated counterpart. Address mappings may be employed, as discussed above, however other methods can be employed to redirect execution to translations in lieu of their corresponding code portions.
At 306, the method includes inserting usage information into the hardware structure. The usage information varies in response to entries being used to redirect execution. Examples of suitable usage information include per-entry access bits; counts of how many times an entry is used to redirect execution; indication of time(s) when entries are used to redirect execution; etc. In some examples, the usage information is extracted from the hardware structure, and is stored in software and processed to control the population of entries referenced at 304.
Indeed, at 308, the method includes maintaining or evicting entries from the hardware structure based on the varying usage information of step 306. As described above, this may include controlling what entries are present in the hardware structure based on how frequently and/or how recently entries were used to redirect execution.
In examples with access bits, those bits may be repeatedly sampled and cleared in order to generate a history of access bit values over time. This history can then be analyzed to perform the maintenance/eviction shown at step 308.
The flowchart of FIG. 3 is not intended to imply that steps need to be performed in a particular sequence, though particular orderings may be desired in certain settings. In general, steps may be performed in sequences other than those shown in the figure, and in many cases steps will be performed in parallel.
FIG. 4 shows another example method 400 for alternatively processing in a translation mode or in a hardware decoder mode. This example method specifically includes use of access bits in a hardware redirector as previously described. At 402, method 400 includes executing target ISA instructions in a hardware decoder mode. In order to easily switch between code portions (i.e., target ISA portions and/or native ISA portions), the code portions may be separated at branch instructions. In other words, a first code portion may end at a branch instruction such that the targets of the branch instruction refer to the beginnings of other code portions. Accordingly, execution of target ISA instructions at 402 may continue until reaching such a branch instruction, and then continue on to 404. Instead of the branches in this example, any other suitable separation of code segments may be employed.
At 404, the method includes evaluating if a hit occurs in a hardware redirector, such as hardware redirector 210 of FIG. 2. The query to the hardware redirector may, in one example, be implemented by looking up an address associated with the branch target. In the event of a hit, method 400 continues to 406, where an access bit associated with the redirection entry.
At 408, the method includes executing the associated translation. Execution of the translation continues until: (1) a native branch 410 is reached, at which point another translation will be executed, or (2) an external branch (i.e., branch to a target ISA code portion) is reached, at which point processing returns to 404 for further query to the entries in the hardware redirector.
Referring again to 404, if there is not an entry in hardware redirector corresponding to the branch target, a miss may be recorded at 412. Misses may be associated with branch targets in order to identify frequently missed targets or targets that have been missed more than a threshold number of times. Specifically, at 414, method 400 includes evaluating if a miss trigger condition has occurred. Such a trigger may be determined via any appropriate mechanism using a variety of different criteria in addition to, or instead of, the frequency/threshold examples mentioned above. Steps 412 and 414 may be thought of as tracking usage of the hardware decoder, since a branch target miss will result in hardware decoder mode execution.
If the trigger condition is satisfied, the method may include, at 416, potentially adding an entry for the branch target into the hardware redirector if a translation exists. In one example, a native branch may then be used to continue to the translation mode execution shown at 408. If translation does not exist, however, method 400 may include, at 418, potentially generating a translation and adding an entry for that translation in the hardware redirector. Alternatively, the system could record that translation may be required or desirable, and processing could return to hardware decoder mode execution at 402 instead of creating the translation immediately.
As with the previous flowchart, it should be understood that the various steps in many cases may be performed in a sequence other than that implied by the figures. For example, hardware decoder mode execution typically will initiate immediately upon a miss at 404, such that steps 412, 414, 416 and 418 would occur in parallel with the hardware decoder processing of the missed branch target.
At any point during the processing described in method 400, the method may include maintaining the hardware redirection structure, as shown at 420. Maintaining the hardware redirector may include reading access bits at 422 and clearing the access bits at 424. Maintaining may further include, at 426, updating the entries in the hardware redirector based on the usage information, as determined with reference to the values of the access bits.
It will be appreciated that methods described herein are provided for illustrative purposes only and are not intended to be limiting. Accordingly, it will be appreciated that in some embodiments the methods described herein may include additional or alternative processes, while in some embodiments, the methods described herein may include some processes that may be reordered or omitted without departing from the scope of the present disclosure. Further, it will be appreciated that the methods described herein may be performed using any suitable software and hardware including the specific examples described herein.
This written description uses examples to disclose the invention, including the best mode, and also to enable a person of ordinary skill in the relevant art to practice the invention, including making and using any devices or systems and performing any incorporated methods. The patentable scope of the invention is defined by the claims, and may include other examples as understood by those of ordinary skill in the art. Such other examples are intended to be within the scope of the claims.

## Claims

1. A micro-processing system including a microprocessor and associated memory system, comprising:
a hardware structure on a core of the microprocessor;
a plurality of entries in the hardware structure, each entry being associated with a translation of a corresponding code portion, the translation being executable by the microprocessor in lieu of the corresponding code portion to achieve substantially equivalent functionality;
a redirection array in the hardware structure that includes, for each entry, redirection information usable to cause execution to be redirected from the corresponding code portion to the translation for that corresponding code portion;
a history data structure that tracks a history of a value of an access bit, wherein the history data structure has more entries than the hardware redirector and is analyzed to increase hit rate of the redirection array; and
an access array in the hardware structure that includes usage information that varies in response to the entries being used to redirect execution, where specific entries are maintained within or evicted from the hardware structure based on the usage information for those entries.

2. The micro-processing system of claim 1, further comprising management software that repeatedly samples values in the access array and controls whether specific entries are maintained within or evicted from the hardware structure based on how frequently those entries were used to redirect execution to translations.

3. The micro-processing system of claim 1, further comprising management software that repeatedly samples values in the access array and controls whether specific entries are maintained within or evicted from the hardware structure based on how recently those entries were used to redirect execution to translations.

4. The micro-processing system of claim 1, further comprising management software that repeatedly samples values in the access array and controls whether specific entries are maintained within or evicted from the hardware structure based on how frequently and how recently those entries were used to redirect execution to translations.

5. The micro-processing system of claim 1, further comprising a hardware decoder on the core of the microprocessor, where if a selected code portion does not have an entry in the hardware structure, that selected code portion is executed by the microprocessor using the hardware decoder, and where if the selected code portion does have an entry in the hardware structure, its corresponding translation is executed by the microprocessor without using the hardware decoder.

6. The micro-processing system of claim 1, where the usage information in the access array includes, for each entry, an access bit which is a binary indication of whether or not the entry has been used to redirect execution to a translation.

7. The micro-processing system of claim 6, where the micro-processing system is operative to (1) set the access bits in the access array when their corresponding entries are used to redirect execution to translations; and (2) clear the access bits between times when they have been set.

8. The micro-processing system of claim 7, further comprising management software that repeatedly samples and clears the access bits to generate a history of access bit values over time, the management software being further operative to control whether a selected entry is maintained within or evicted from the hardware structure based on the history of the access bit associated with that entry.

9. The micro-processing system of claim 8, where the management software is operative to control whether the selected entry is maintained within or evicted from the hardware structure based on one or more of how recently and how frequently the entry is used to redirect execution to the associated translation, as reflected in the history of the access bit.

10. The micro-processing system of claim 1, where the usage information in the access array includes, for each entry, a count of how many times the entry has been used to redirect execution to a translation.

11. The micro-processing system of claim 1, where the usage information in the access array includes, for each entry, a time when the entry was used to redirect execution to a translation.

12. In a processing pipeline having a hardware decoder disposed on a core of a microprocessor, a method of alternatively processing in a translation mode that omits use of the hardware decoder, or in a hardware decoder mode that makes use of the hardware decoder, the method comprising:
generating a plurality of translations, each translation being executable in the translation mode in lieu of executing a corresponding code portion in the hardware decoder mode, to achieve substantially equivalent functionality;
inserting, into a hardware structure on the core of the microprocessor, a plurality of entries, where each entry (1) is associated with one of the translations and its corresponding code portion, (2) includes redirection information usable during a fetch operation to cause execution to be redirected to the associated translation from its corresponding code portion;
inserting usage information into the hardware structure, where the usage information varies in response to the entries being used to redirect execution;
inserting history information regarding a value of an access bit, wherein the history information has more entries than the usage information and is analyzed to increase hit rate of a redirection array; and
maintaining or evicting specific entries from the hardware structure based on analysis of the usage information.

13. The method of claim 12, where maintaining or evicting specific entries from the hardware structure is performed based on how frequently those entries were used to redirect execution, as determined by the analysis of the usage information.

14. The method of claim 12, where maintaining or evicting specific entries from the hardware structure is performed based on how recently those entries were used to redirect execution, as determined by the analysis of the usage information.

15. The method of claim 12, where maintaining or evicting specific entries from the hardware structure is performed based on how frequently and how recently those entries were used to redirect execution, as determined by the analysis of the usage information.

16. The method of claim 12, where the usage information includes, for each entry in the hardware structure, an access bit which is a binary indication of whether the entry has been used to redirect execution.

17. The method of claim 16, further comprising repeatedly sampling and clearing the access bits to generate a history of access bit values over time for each entry, where maintaining or evicting specific entries from the hardware structure is based on analysis of the history of access bit values over time for those entries.

18. The method of claim 17, where the history of access bit values for each entry includes at least one of (1) how frequently the entry was used to redirect execution; (2) how recently the entry was used to redirect execution; (3) a count of how many times the entry was used to redirect execution; and (4) a time when the entry was used to redirect execution.

19. A micro-processing system including a microprocessor and associated memory system, comprising:
a hardware structure on a core of the microprocessor;
a plurality of entries in the hardware structure, each entry being associated with a translation of a corresponding code portion, the translation being generated by a dynamic binary translator and executable by the micro- processor in lieu of the corresponding code portion to achieve substantially equivalent functionality;
a redirection array in the hardware structure that includes, for each entry, redirection information usable during a fetch operation to cause execution to be redirected from the corresponding code portion to the translation for that corresponding code portion;
an access array in the hardware structure that includes, for each entry, an access bit which is a binary indication of whether the entry has been used to redirect execution to its translation;
a history data structure that tracks a history of a value of an access bit, wherein the history data structure has more entries than the access array and is analyzed to increase hit rate of the redirection array; and
management software that repeatedly samples and clears the access bits to generate, for each entry, a history of its access bit value over time, and controls whether specific entries are maintained within or evicted from the hardware structure based on the history of the access bit value for those entries.

20. The system of claim 19, where the management software controls whether specific entries are maintained within or evicted from the hardware structure based on at least one of how recently and how frequently those entries were used to redirect execution.