Patent ID: 7457926

Claim:
A system for cache replacement monitoring (CRM), comprising: a monitored cache comprising a monitored cache line set, the monitored cache line set comprising at least one cache line holding data of a monitored address; and a CRM mechanism operatively associated with the monitored cache, wherein the CRM mechanism collects CRM information for the monitored address, wherein the CRM information includes the number of times the monitored cache line or any cache line, is replaced, memory addresses that have recently replaced the monitored cache line, or any cache line in the monitored cache line set; memory addresses that have recently been replaced by the monitored cache line, or any cache line in a monitored cache line set; and the time interval between two recent placements of the monitored cache line or any cache line in the monitored cache line set, wherein the time interval can be measured by a number of processor cycles, a number of instructions, a number of memory access instructions or a number of cache accesses, and wherein the CRM mechanism includes a CRM table with a plurality of table entries, each of the table entries is comprised of an address register (“AR”) that records the memory address associated with a monitored cache line, a monitor register (“MR”) that records the number of times the cache line has been replaced and records the number of times the monitored address is replaced in the monitored cache, and a conflicting address register (“CAR”) that records one or more recent replacing memory address that have recently replaced the monitored cache line.