[gem5] Add statistics for cache register and flush.