drcachesim warmup_refs is ignored for even values
There are 2 calls to check_warmed_up() which cause double-decrementing and a failure to detect hitting zero for even values:
$ clients/bin64/drcachesim -warmup_refs 50 -sim_refs 100 -indir drmemtrace.*.dir
Cache simulation results:
Core #0 (1 thread(s))
L1I stats:
Warmup hits: 0
Warmup misses: 0
Hits: 75
Misses: 6
Compulsory misses: 6
Invalidations: 0
Miss rate: 7.41%
$ clients/bin64/drcachesim -warmup_refs 51 -sim_refs 100 -indir drmemtrace.*.dir
Cache simulation results:
Core #0 (1 thread(s))
L1I stats:
Warmup hits: 12
Warmup misses: 2
Hits: 64
Misses: 4
Compulsory misses: 4
Invalidations: 0
Miss rate: 5.88%