misc: Updated the RELEASE-NOTES and version number
[gem5.git] / src / cpu / pred / bpred_unit.hh
index c4dbad2b00fec2193472cbb1ddbca5d9874e1d6c..c90d450bc064590beab359888b4e740da32e6b06 100644 (file)
@@ -68,11 +68,6 @@ class BPredUnit : public SimObject
      */
     BPredUnit(const Params *p);
 
-    /**
-     * Registers statistics.
-     */
-    void regStats() override;
-
     void regProbePoints() override;
 
     /** Perform sanity checks after a drain. */
@@ -177,8 +172,7 @@ class BPredUnit : public SimObject
      */
     virtual void update(ThreadID tid, Addr instPC, bool taken,
                    void *bp_history, bool squashed,
-                   const StaticInstPtr & inst = StaticInst::nullStaticInstPtr,
-                   Addr corrTarget = MaxAddr) = 0;
+                   const StaticInstPtr &inst, Addr corrTarget) = 0;
     /**
      * Updates the BTB with the target of a branch.
      * @param inst_PC The branch's PC that will be updated.
@@ -283,33 +277,35 @@ class BPredUnit : public SimObject
     /** The indirect target predictor. */
     IndirectPredictor * iPred;
 
-    /** Stat for number of BP lookups. */
-    Stats::Scalar lookups;
-    /** Stat for number of conditional branches predicted. */
-    Stats::Scalar condPredicted;
-    /** Stat for number of conditional branches predicted incorrectly. */
-    Stats::Scalar condIncorrect;
-    /** Stat for number of BTB lookups. */
-    Stats::Scalar BTBLookups;
-    /** Stat for number of BTB hits. */
-    Stats::Scalar BTBHits;
-    /** Stat for number of times the BTB is correct. */
-    Stats::Scalar BTBCorrect;
-    /** Stat for percent times an entry in BTB found. */
-    Stats::Formula BTBHitPct;
-    /** Stat for number of times the RAS is used to get a target. */
-    Stats::Scalar usedRAS;
-    /** Stat for number of times the RAS is incorrect. */
-    Stats::Scalar RASIncorrect;
-
-    /** Stat for the number of indirect target lookups.*/
-    Stats::Scalar indirectLookups;
-    /** Stat for the number of indirect target hits.*/
-    Stats::Scalar indirectHits;
-    /** Stat for the number of indirect target misses.*/
-    Stats::Scalar indirectMisses;
-    /** Stat for the number of indirect target mispredictions.*/
-    Stats::Scalar indirectMispredicted;
+    struct BPredUnitStats : public Stats::Group {
+        BPredUnitStats(Stats::Group *parent);
+
+        /** Stat for number of BP lookups. */
+        Stats::Scalar lookups;
+        /** Stat for number of conditional branches predicted. */
+        Stats::Scalar condPredicted;
+        /** Stat for number of conditional branches predicted incorrectly. */
+        Stats::Scalar condIncorrect;
+        /** Stat for number of BTB lookups. */
+        Stats::Scalar BTBLookups;
+        /** Stat for number of BTB hits. */
+        Stats::Scalar BTBHits;
+        /** Stat for percent times an entry in BTB found. */
+        Stats::Formula BTBHitPct;
+        /** Stat for number of times the RAS is used to get a target. */
+        Stats::Scalar RASUsed;
+        /** Stat for number of times the RAS is incorrect. */
+        Stats::Scalar RASIncorrect;
+
+        /** Stat for the number of indirect target lookups.*/
+        Stats::Scalar indirectLookups;
+        /** Stat for the number of indirect target hits.*/
+        Stats::Scalar indirectHits;
+        /** Stat for the number of indirect target misses.*/
+        Stats::Scalar indirectMisses;
+        /** Stat for the number of indirect target mispredictions.*/
+        Stats::Scalar indirectMispredicted;
+    } stats;
 
   protected:
     /** Number of bits to shift instructions by for predictor addresses. */