stats: Move the swpipl function into the Alpha kernel stats.
[gem5.git] / src / kern / kernel_stats.cc
index 29c77b3d9adae8f25bada84d6c32566efd3a4fca..2d1d4fa8456af733ed91fe5a170d6f8c033ca155 100644 (file)
@@ -34,7 +34,6 @@
 #include "base/trace.hh"
 #include "cpu/thread_context.hh"
 #include "kern/kernel_stats.hh"
-#include "kern/tru64/tru64_syscalls.hh"
 #include "sim/system.hh"
 
 using namespace std;
@@ -42,11 +41,6 @@ using namespace Stats;
 
 namespace Kernel {
 
-Statistics::Statistics(System *system)
-    : iplLast(0), iplLastTick(0)
-{
-}
-
 void
 Statistics::regStats(const string &_name)
 {
@@ -61,82 +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;
-
-    _syscall
-        .init(SystemCalls<Tru64>::Number)
-        .name(name() + ".syscall")
-        .desc("number of syscalls executed")
-        .flags(total | pdf | nozero | nonan)
-        ;
-
-    //@todo This needs to get the names of syscalls from an appropriate place.
-#if 0
-    for (int i = 0; i < SystemCalls<Tru64>::Number; ++i) {
-        const char *str = SystemCalls<Tru64>::name(i);
-        if (str) {
-            _syscall.subname(i, str);
-        }
-    }
-#endif
-}
-
-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(ostream &os)
-{
-    SERIALIZE_SCALAR(iplLast);
-    SERIALIZE_SCALAR(iplLastTick);
-}
-
-void
-Statistics::unserialize(Checkpoint *cp, const string &section)
-{
-    UNSERIALIZE_SCALAR(iplLast);
-    UNSERIALIZE_SCALAR(iplLastTick);
 }
 
-/* end namespace Kernel */ }
+} // namespace Kernel