Add a flag to drcachesim to set cache warmup by loaded fraction
Created by: snehasish
drcachesim currently supports cache warm up by absolute number of references. We would like to support cache warmup determined by what fraction of the cache has been loaded -- eg "the cache is warm once 90% of its blocks have been loaded".
We determine the loaded fraction of the cache hierarchy by enumerating valid blocks in the last level cache only.
Implementation:
- Add warmup fraction knob to
simulator_t
- Add counter
num_valid_blocks
tocaching_device_t
. Count of valid blocks are maintained by incrementing on load miss. This counter will need to be decremented on a) flush b) coherence invalidations (#1726 (closed)) - Check loaded fraction to determine warmup reached in
cache_simulator_t::process_memref
. Only use the fraction from llcache as we are simulating a two level hierarchy with a single last level cache (#1715 (closed)).