[gem5] Integrate and implement stats.