summaryrefslogtreecommitdiff
path: root/src/kern/kernel_stats.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-08-25 18:02:01 -0700
committerGabe Black <gabeblack@google.com>2017-09-11 04:59:01 +0000
commita50bcfb436da42dbd6005da681ed91bb768684f4 (patch)
tree4a8e021bc59cd0d3dba43939e035bfac67d089bf /src/kern/kernel_stats.cc
parentb9d8700a38ccecfbe97c152bc9fc3b7c3b09e9a2 (diff)
downloadgem5-a50bcfb436da42dbd6005da681ed91bb768684f4.tar.xz
stats: Move the swpipl function into the Alpha kernel stats.
This stat is only incremented by Alpha. Also move the _hwrei into the Alpha stats object since it's the class that actually sets up and maintains that value and it probably should have been there all along. Change-Id: Ibd038a33230c01432c160490926d8e1e55f8ccb0 Reviewed-on: https://gem5-review.googlesource.com/4601 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/kern/kernel_stats.cc')
-rw-r--r--src/kern/kernel_stats.cc64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/kern/kernel_stats.cc b/src/kern/kernel_stats.cc
index 37677c1fc..2d1d4fa84 100644
--- a/src/kern/kernel_stats.cc
+++ b/src/kern/kernel_stats.cc
@@ -41,11 +41,6 @@ using namespace Stats;
namespace Kernel {
-Statistics::Statistics()
- : iplLast(0), iplLastTick(0)
-{
-}
-
void
Statistics::regStats(const string &_name)
{
@@ -60,65 +55,6 @@ Statistics::regStats(const string &_name)
.name(name() + ".inst.quiesce")
.desc("number of quiesce instructions executed")
;
-
- _iplCount
- .init(32)
- .name(name() + ".ipl_count")
- .desc("number of times we switched to this ipl")
- .flags(total | pdf | nozero | nonan)
- ;
-
- _iplGood
- .init(32)
- .name(name() + ".ipl_good")
- .desc("number of times we switched to this ipl from a different ipl")
- .flags(total | pdf | nozero | nonan)
- ;
-
- _iplTicks
- .init(32)
- .name(name() + ".ipl_ticks")
- .desc("number of cycles we spent at this ipl")
- .flags(total | pdf | nozero | nonan)
- ;
-
- _iplUsed
- .name(name() + ".ipl_used")
- .desc("fraction of swpipl calls that actually changed the ipl")
- .flags(total | nozero | nonan)
- ;
-
- _iplUsed = _iplGood / _iplCount;
-}
-
-void
-Statistics::swpipl(int ipl)
-{
- assert(ipl >= 0 && ipl <= 0x1f && "invalid IPL\n");
-
- _iplCount[ipl]++;
-
- if (ipl == iplLast)
- return;
-
- _iplGood[ipl]++;
- _iplTicks[iplLast] += curTick() - iplLastTick;
- iplLastTick = curTick();
- iplLast = ipl;
-}
-
-void
-Statistics::serialize(CheckpointOut &cp) const
-{
- SERIALIZE_SCALAR(iplLast);
- SERIALIZE_SCALAR(iplLastTick);
-}
-
-void
-Statistics::unserialize(CheckpointIn &cp)
-{
- UNSERIALIZE_SCALAR(iplLast);
- UNSERIALIZE_SCALAR(iplLastTick);
}
} // namespace Kernel