const char *modestr[] = { "kernel", "user", "idle" };
-Statistics::Statistics(System *system)
- : ::Kernel::Statistics(system),
+Statistics::Statistics()
+ : ::Kernel::Statistics(),
idleProcess((Addr)-1), themode(kernel), lastModeTick(0)
{
}
#include "cpu/static_inst.hh"
#include "kern/kernel_stats.hh"
-class BaseCPU;
class ThreadContext;
-class FnEvent;
-// What does kernel stats expect is included?
-class System;
namespace AlphaISA {
namespace Kernel {
Stats::Scalar _swap_context;
public:
- Statistics(System *system);
+ Statistics();
void regStats(const std::string &name);
#ifndef __ARCH_ARM_KERNEL_STATS_HH__
#define __ARCH_ARM_KERNEL_STATS_HH__
-#include <map>
-#include <stack>
-#include <string>
-#include <vector>
-
#include "kern/kernel_stats.hh"
namespace ArmISA {
namespace Kernel {
-enum cpu_mode { hypervisor, kernel, user, idle, cpu_mode_num };
-extern const char *modestr[];
-
class Statistics : public ::Kernel::Statistics
{
public:
- Statistics(System *system) : ::Kernel::Statistics(system)
+ Statistics() : ::Kernel::Statistics()
{}
};
namespace MipsISA {
namespace Kernel {
-enum cpu_mode { kernel, user, idle, cpu_mode_num };
-extern const char *modestr[];
-
class Statistics : public ::Kernel::Statistics
{
public:
- Statistics(System *system) : ::Kernel::Statistics(system)
+ Statistics() : ::Kernel::Statistics()
{}
};
-
} // namespace MipsISA::Kernel
} // namespace MipsISA
namespace PowerISA {
namespace Kernel {
-enum cpu_mode { hypervisor, kernel, user, idle, cpu_mode_num };
-extern const char *modestr[];
-
class Statistics : public ::Kernel::Statistics
{
public:
- Statistics(System *system) : ::Kernel::Statistics(system)
+ Statistics() : ::Kernel::Statistics()
{}
};
namespace RiscvISA {
namespace Kernel {
-enum cpu_mode { kernel, user, idle, cpu_mode_num };
-extern const char *modestr[];
-
class Statistics : public ::Kernel::Statistics
{
public:
- Statistics(System *system) : ::Kernel::Statistics(system)
+ Statistics() : ::Kernel::Statistics()
{}
};
-
} // namespace RiscvISA::Kernel
} // namespace RiscvISA
namespace SparcISA {
namespace Kernel {
-enum cpu_mode { hypervisor, kernel, user, idle, cpu_mode_num };
-extern const char *modestr[];
-
class Statistics : public ::Kernel::Statistics
{
public:
- Statistics(System *system) : ::Kernel::Statistics(system)
+ Statistics() : ::Kernel::Statistics()
{}
};
namespace X86ISA {
namespace Kernel {
-enum cpu_mode {
- ring0,
- ring1,
- ring2,
- ring3,
- kernel = ring0,
- user = ring3,
- idle,
- //What is this next one for?
- cpu_mode_num
-};
-
-extern const char *modestr[];
-
class Statistics : public ::Kernel::Statistics
{
public:
- Statistics(System * system) : ::Kernel::Statistics(system)
+ Statistics() : ::Kernel::Statistics()
{}
};
O3ThreadContext<Impl>::regStats(const std::string &name)
{
if (FullSystem) {
- thread->kernelStats = new TheISA::Kernel::Statistics(cpu->system);
+ thread->kernelStats = new TheISA::Kernel::Statistics();
thread->kernelStats->regStats(name + ".kern");
}
}
profilePC = 3;
if (use_kernel_stats)
- kernelStats = new TheISA::Kernel::Statistics(system);
+ kernelStats = new TheISA::Kernel::Statistics();
}
SimpleThread::~SimpleThread()
namespace Kernel {
-Statistics::Statistics(System *system)
+Statistics::Statistics()
: iplLast(0), iplLastTick(0)
{
}
#include <string>
-#include "config/the_isa.hh"
#include "sim/serialize.hh"
#include "sim/stats.hh"
// What does kernel stats expect is included?
-class System;
-
namespace Kernel {
class Statistics : public Serializable
Tick iplLastTick;
public:
- Statistics(System *system);
+ Statistics();
virtual ~Statistics() {}
const std::string name() const { return myname; }