diff options
author | Gabe Black <gabeblack@google.com> | 2017-08-25 17:39:18 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-09-11 04:58:38 +0000 |
commit | b9d8700a38ccecfbe97c152bc9fc3b7c3b09e9a2 (patch) | |
tree | 4335c0296aa9f02e3f9378fe983165d80f691f5c /src/arch | |
parent | 725b19a8154fa557ab3057f07d7cd3c6d798789d (diff) | |
download | gem5-b9d8700a38ccecfbe97c152bc9fc3b7c3b09e9a2.tar.xz |
stats: Get rid of some kernel stats related cruft.
The kernel stat mechanism should really be refactored and moved somewhere
else, but in the mean time there's some old cruft that can be cleared away.
Change-Id: I21e725de590dda0d20bf3bc675bbe976c7b1bd86
Reviewed-on: https://gem5-review.googlesource.com/4600
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/alpha/kernel_stats.cc | 4 | ||||
-rw-r--r-- | src/arch/alpha/kernel_stats.hh | 6 | ||||
-rw-r--r-- | src/arch/arm/kernel_stats.hh | 10 | ||||
-rw-r--r-- | src/arch/mips/kernel_stats.hh | 6 | ||||
-rw-r--r-- | src/arch/power/kernel_stats.hh | 5 | ||||
-rw-r--r-- | src/arch/riscv/kernel_stats.hh | 6 | ||||
-rw-r--r-- | src/arch/sparc/kernel_stats.hh | 5 | ||||
-rw-r--r-- | src/arch/x86/kernel_stats.hh | 16 |
8 files changed, 9 insertions, 49 deletions
diff --git a/src/arch/alpha/kernel_stats.cc b/src/arch/alpha/kernel_stats.cc index fed8b09e4..a1ed532d8 100644 --- a/src/arch/alpha/kernel_stats.cc +++ b/src/arch/alpha/kernel_stats.cc @@ -50,8 +50,8 @@ namespace Kernel { const char *modestr[] = { "kernel", "user", "idle" }; -Statistics::Statistics(System *system) - : ::Kernel::Statistics(system), +Statistics::Statistics() + : ::Kernel::Statistics(), idleProcess((Addr)-1), themode(kernel), lastModeTick(0) { } diff --git a/src/arch/alpha/kernel_stats.hh b/src/arch/alpha/kernel_stats.hh index 06d20e6fa..3b2b5a0c0 100644 --- a/src/arch/alpha/kernel_stats.hh +++ b/src/arch/alpha/kernel_stats.hh @@ -40,11 +40,7 @@ #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 { @@ -73,7 +69,7 @@ class Statistics : public ::Kernel::Statistics Stats::Scalar _swap_context; public: - Statistics(System *system); + Statistics(); void regStats(const std::string &name); diff --git a/src/arch/arm/kernel_stats.hh b/src/arch/arm/kernel_stats.hh index be5c25bd5..dd184f805 100644 --- a/src/arch/arm/kernel_stats.hh +++ b/src/arch/arm/kernel_stats.hh @@ -31,23 +31,15 @@ #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() {} }; diff --git a/src/arch/mips/kernel_stats.hh b/src/arch/mips/kernel_stats.hh index 5cf6087c8..abb964a71 100644 --- a/src/arch/mips/kernel_stats.hh +++ b/src/arch/mips/kernel_stats.hh @@ -37,17 +37,13 @@ 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 diff --git a/src/arch/power/kernel_stats.hh b/src/arch/power/kernel_stats.hh index b4d9a69b6..1ae77d910 100644 --- a/src/arch/power/kernel_stats.hh +++ b/src/arch/power/kernel_stats.hh @@ -36,13 +36,10 @@ 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() {} }; diff --git a/src/arch/riscv/kernel_stats.hh b/src/arch/riscv/kernel_stats.hh index 6cb6ed068..a796075f5 100644 --- a/src/arch/riscv/kernel_stats.hh +++ b/src/arch/riscv/kernel_stats.hh @@ -37,17 +37,13 @@ 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 diff --git a/src/arch/sparc/kernel_stats.hh b/src/arch/sparc/kernel_stats.hh index 3d4c677a0..9c13e520a 100644 --- a/src/arch/sparc/kernel_stats.hh +++ b/src/arch/sparc/kernel_stats.hh @@ -41,13 +41,10 @@ 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() {} }; diff --git a/src/arch/x86/kernel_stats.hh b/src/arch/x86/kernel_stats.hh index e5b9a0c95..1a821a0e9 100644 --- a/src/arch/x86/kernel_stats.hh +++ b/src/arch/x86/kernel_stats.hh @@ -45,24 +45,10 @@ 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() {} }; |