Code cache management schemes for dynamic optimizers
Kim Hazelwood, Michael D. Smith · 2005
A dynamic optimizer is a software-based system that performs code modifications at runtime, and several such systems have been proposed over the past several years. These systems typically perform optimization on the level of an instruction trace, and most use caching mechanisms to store recently optimized portions of code. Since the dynamic optimizers produce variable-length code traces that are modified copies of portions of the original executable, a code cache management scheme must deal with the difficult problem of caching objects that vary in size and cannot be subdivided without adding extra jump instructions. Because of these constraints, many dynamic optimizers have chosen unsophisticated schemes, such as flushing the entire cache when it becomes full. Flushing minimizes the overhead of cache management but tends to discard many useful traces. This paper evaluates several alternative cache management schemes that identify and remove only enough traces to make room for a new trace. We find that by treating the code cache as a circular buffer, we can reduce the code cache miss rate by half of that achieved by flushing. Furthermore, this approach adds very little bookkeeping overhead and avoids the problems associated with code cache fragmentation. These characteristics are extremely important in a dynamic system since more complex strategies will do more harm than good if the overhead is too high.
Cited by 36 works. doi:10.1109/intera.2002.995847
Authors
References
- The superblock: An effective technique for VLIW and superscalar compilation
- Dynamo
- Dynamo
- Adaptive optimization in the Jalapeno JVM
- Adaptive optimization in the Jalapeño JVM
- Design and Implementation of a Dynamic Optimization Framework for Windows
- Quality and speed in linear-scan register allocation
- Transparent Dynamic Optimization: The Design and Implementation of Dynamo
- A hardware-driven profiling scheme for identifying program hot spots to support runtime optimization
- Overcoming the challenges to feedback-directed optimization (Keynote Talk)