X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fcpu%2Fthread_state.hh;h=3ac473dce7f9ae81868bdb2bb464e24e515fb319;hb=7bab96da671cd2ada6d2a1e3db2707c933247934;hp=1cc92a1750f80e5d5cfcd7d0b9484b47d185ecb2;hpb=cc48c6fa47618268e753fdaa3f162198f18a5be5;p=gem5.git diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh index 1cc92a175..3ac473dce 100644 --- a/src/cpu/thread_state.hh +++ b/src/cpu/thread_state.hh @@ -106,14 +106,19 @@ struct ThreadState : public Serializable { /** Number of instructions committed. */ Counter numInst; - /** Stat for number instructions committed. */ - Stats::Scalar numInsts; - /** Number of ops (including micro ops) committed. */ + /** Number of ops (including micro ops) committed. */ Counter numOp; - /** Stat for number ops (including micro ops) committed. */ - Stats::Scalar numOps; - /** Stat for number of memory references. */ - Stats::Scalar numMemRefs; + // Defining the stat group + struct ThreadStateStats : public Stats::Group + { + ThreadStateStats(BaseCPU *cpu, ThreadState *thread); + /** Stat for number instructions committed. */ + Stats::Scalar numInsts; + /** Stat for number ops (including micro ops) committed. */ + Stats::Scalar numOps; + /** Stat for number of memory references. */ + Stats::Scalar numMemRefs; + } threadStats; /** Number of simulated loads, used for tracking events based on * the number of loads committed.