From 4bfb8547bbdee3bd0ec23ae067ff04fd5e07f4be Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 7 Nov 2006 05:36:54 -0500 Subject: Moved the switched version of kernel_stats.hh back to kern, and moved the base kernel_stats to base_kernel_stats --HG-- extra : convert_revision : 2a010d2eb7ea2586ff063b99b8bcde6eb1e8e017 --- src/kern/base_kernel_stats.hh | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'src/kern/base_kernel_stats.hh') diff --git a/src/kern/base_kernel_stats.hh b/src/kern/base_kernel_stats.hh index bd4850b0a..66248c9c8 100644 --- a/src/kern/base_kernel_stats.hh +++ b/src/kern/base_kernel_stats.hh @@ -32,12 +32,10 @@ #ifndef __KERNEL_STATS_HH__ #define __KERNEL_STATS_HH__ -#include -#include #include -#include #include "cpu/static_inst.hh" +#include "sim/serialize.hh" class BaseCPU; class ThreadContext; @@ -47,21 +45,12 @@ class System; namespace Kernel { -enum cpu_mode { kernel, user, idle, cpu_mode_num }; -extern const char *modestr[]; - class Statistics : public Serializable { - private: + protected: std::string myname; - Addr idleProcess; - cpu_mode themode; - Tick lastModeTick; - - void changeMode(cpu_mode newmode, ThreadContext *tc); - - private: + protected: Stats::Scalar<> _arm; Stats::Scalar<> _quiesce; Stats::Scalar<> _hwrei; @@ -71,23 +60,16 @@ class Statistics : public Serializable Stats::Vector<> _iplTicks; Stats::Formula _iplUsed; - Stats::Vector<> _callpal; Stats::Vector<> _syscall; // Stats::Vector<> _faults; - Stats::Vector<> _mode; - Stats::Vector<> _modeGood; - Stats::Formula _modeFraction; - Stats::Vector<> _modeTicks; - - Stats::Scalar<> _swap_context; - private: int iplLast; Tick iplLastTick; public: Statistics(System *system); + virtual ~Statistics() {} const std::string name() const { return myname; } void regStats(const std::string &name); @@ -95,13 +77,7 @@ class Statistics : public Serializable public: void arm() { _arm++; } void quiesce() { _quiesce++; } - void hwrei() { _hwrei++; } void swpipl(int ipl); - void mode(cpu_mode newmode, ThreadContext *tc); - void context(Addr oldpcbb, Addr newpcbb, ThreadContext *tc); - void callpal(int code, ThreadContext *tc); - - void setIdleProcess(Addr idle, ThreadContext *tc); public: virtual void serialize(std::ostream &os); -- cgit v1.2.3