With trigger mode, how do I ensure caches and predictors are warmed up?
If you want to warm up the cache and branch predictors prior to starting statistics collection, combine the -trigger option with the -snapshot N option, to start full simulation at the top of the benchmark’s main loop (where the trigger call is) but only start gathering statistics N cycles later, after the processor is warmed up. Remember, since the trigger point is placed after all initialization code in the benchmark, in general it is only necessary to wait 10-20 million cycles of warmup before taking the first statistics snapshot. In this time, the caches and branch predictor will almost always be completely overwritten many times. This approach significantly speeds up the simulation without any loss of accuracy compared to the “fast simulation” mode provided by other simulators.