cpu-o3: Move general fetch stats to BaseCPU::FetchCPUStats

The stats moved are from fetch.hh and fetch.cc of O3. Stat branches is
now tracked by numBranches. Stat branchRate is now tracked by
branchRate in FetchCPUStats. Stat rate is tracked by fetchRate. Stat
insts is tracked by numInsts. Stat icacheStallCycles is tracked by
icacheStallCycles in FetchCPUStats.

Change-Id: I48313614edd078631df4ef6b00982c335798fcb1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67394
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Melissa Jost
2023-01-19 02:04:39 -08:00
committed by Bobby Bruce
parent d943e42bdd
commit 1c4cc8dbd0
4 changed files with 41 additions and 39 deletions

View File

@@ -695,9 +695,18 @@ class BaseCPU : public ClockedObject
/* Total number of operations fetched */
statistics::Scalar numOps;
/* Number of instruction fetched per cycle. */
statistics::Formula fetchRate;
/* Total number of branches fetched */
statistics::Scalar numBranches;
/* Number of branch fetches per cycle. */
statistics::Formula branchRate;
/* Number of cycles stalled due to an icache miss */
statistics::Scalar icacheStallCycles;
/* Number of times fetch was asked to suspend by Execute */
statistics::Scalar numFetchSuspends;