摘要 |
A system and method for selectively enabling only certain information to be cached is provided which thereby increases the performance of a computer system by reducing cache hits and cache thrashing. The system and method determines and identifies at the time of compilation of a computer program, which program and instructions and/or data are to be cached or not cached, during the execution of the computer program. The system and method performs these determinations by first compiling a computer program, simulating the op erations of the program with suitable data parameters, and creating a profile of how the program code is utilized by the computer system. The profile is then utilized during a recompilation of the program code to determine which instructions and/or data is to be cached and which are not. The system preferably designates the cache status by affixing additional bits at the end of each instruction/data. During execution of a program code, a bus interface unit determines which instructions/data to cache, where to cache (i.e., level one or a higher level cache), and how to cache (e.g., write through or write back).
|