Jason Lowe-Power has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/52504 )

Change subject: arch-arm,arch-sparc: Remove legacy stat for faults
......................................................................

arch-arm,arch-sparc: Remove legacy stat for faults

This is a legacy stat that was not easy to tie to a Stats::Group.

In ARM, this stat wasn't actually counting all faults, it was only
counting the faults that occured in 32-bit mode, so it's probably safe
to remove the stat (it was wrong anyway). For SPARC, it's also unlikely
anyone is depending on this stat for their research.

Change-Id: Ic6c60526ea51467627535d732258c50ce0d2c03b
Signed-off-by: Jason Lowe-Power <ja...@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52504
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/sparc/faults.cc
M src/arch/sparc/faults.hh
M src/arch/arm/faults.cc
M src/arch/arm/faults.hh
4 files changed, 22 insertions(+), 8 deletions(-)

Approvals:
  Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc
index 64a07cb..e340d07 100644
--- a/src/arch/arm/faults.cc
+++ b/src/arch/arm/faults.cc
@@ -524,7 +524,6 @@
     FaultBase::invoke(tc);
     if (!FullSystem)
         return;
-    countStat()++;

     SCTLR sctlr = tc->readMiscReg(MISCREG_SCTLR);
     SCR scr = tc->readMiscReg(MISCREG_SCR);
diff --git a/src/arch/arm/faults.hh b/src/arch/arm/faults.hh
index 139d477..688faad 100644
--- a/src/arch/arm/faults.hh
+++ b/src/arch/arm/faults.hh
@@ -193,7 +193,6 @@
         // (exceptions taken in HYP mode or in AArch64 state)
         const ExceptionClass ec;

-        FaultStat count;
         FaultVals(const FaultName& name_, const FaultOffset& offset_,
const uint16_t& currELTOffset_, const uint16_t& currELHOffset_,
                 const uint16_t& lowerEL64Offset_,
@@ -237,7 +236,6 @@

     ArmStaticInst *instrAnnotate(const StaticInstPtr &inst);
     virtual void annotate(AnnotationIDs id, uint64_t val) {}
-    virtual FaultStat& countStat() = 0;
     virtual FaultOffset offset(ThreadContext *tc) = 0;
     virtual FaultOffset offset64(ThreadContext *tc) = 0;
     virtual OperatingMode nextMode() = 0;
@@ -269,7 +267,6 @@
     ArmFaultVals<T>(ExtMachInst _machInst = 0, uint32_t _iss = 0) :
         ArmFault(_machInst, _iss) {}
     FaultName name() const override { return vals.name; }
-    FaultStat & countStat() override { return vals.count; }
     FaultOffset offset(ThreadContext *tc) override;

     FaultOffset offset64(ThreadContext *tc) override;
diff --git a/src/arch/sparc/faults.cc b/src/arch/sparc/faults.cc
index ec7386f..421befa 100644
--- a/src/arch/sparc/faults.cc
+++ b/src/arch/sparc/faults.cc
@@ -503,7 +503,6 @@
     if (!FullSystem)
         return;

-    countStat()++;

     // We can refer to this to see what the trap level -was-, but something
     // in the middle could change it in the regfile out from under us.
diff --git a/src/arch/sparc/faults.hh b/src/arch/sparc/faults.hh
index df09dc4..a5fb503 100644
--- a/src/arch/sparc/faults.hh
+++ b/src/arch/sparc/faults.hh
@@ -65,7 +65,6 @@
         const TrapType trapType;
         const FaultPriority priority;
         const PrivilegeLevelSpec nextPrivilegeLevel;
-        FaultStat count;
         FaultVals(const FaultName& name_, const TrapType& trapType_,
const FaultPriority& priority_, const PrivilegeLevelSpec& il)
             : name(name_), trapType(trapType_), priority(priority_),
@@ -76,7 +75,6 @@
                 nullStaticInstPtr);
     virtual TrapType trapType() = 0;
     virtual FaultPriority priority() = 0;
-    virtual FaultStat & countStat() = 0;
     virtual PrivilegeLevel getNextLevel(PrivilegeLevel current) = 0;
 };

@@ -89,7 +87,6 @@
     FaultName name() const { return vals.name; }
     TrapType trapType() { return vals.trapType; }
     FaultPriority priority() { return vals.priority; }
-    FaultStat & countStat() { return vals.count; }

     PrivilegeLevel
     getNextLevel(PrivilegeLevel current)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/52504
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ic6c60526ea51467627535d732258c50ce0d2c03b
Gerrit-Change-Number: 52504
Gerrit-PatchSet: 2
Gerrit-Owner: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to