Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/25149 )
Change subject: arch,cpu,sim: Eliminate the now empty kernel statistics
classes.
......................................................................
arch,cpu,sim: Eliminate the now empty kernel statistics classes.
This includes the base and ISA specific Kernel::Statistics classes, the
plumbing through ThreadContext to access them, and the switching
header file associated with them.
Change-Id: Ia511a59325b629aa9ccc0e695ddd47ff11916499
---
M src/arch/SConscript
D src/arch/alpha/kernel_stats.hh
M src/arch/arm/fastmodel/iris/thread_context.hh
D src/arch/arm/kernel_stats.hh
M src/arch/mips/idle_event.cc
D src/arch/mips/kernel_stats.hh
D src/arch/power/kernel_stats.hh
M src/arch/riscv/idle_event.cc
D src/arch/riscv/kernel_stats.hh
D src/arch/sparc/kernel_stats.hh
D src/arch/x86/kernel_stats.hh
M src/cpu/checker/cpu.cc
M src/cpu/checker/thread_context.hh
M src/cpu/o3/cpu.cc
M src/cpu/o3/thread_context.hh
M src/cpu/o3/thread_context_impl.hh
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
M src/cpu/thread_context.cc
M src/cpu/thread_context.hh
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
D src/kern/kernel_stats.hh
M src/sim/system.cc
24 files changed, 8 insertions(+), 532 deletions(-)
diff --git a/src/arch/SConscript b/src/arch/SConscript
index 0661db7..3d39a01 100644
--- a/src/arch/SConscript
+++ b/src/arch/SConscript
@@ -62,7 +62,6 @@
decoder.hh
isa.hh
isa_traits.hh
- kernel_stats.hh
locked_mem.hh
microcode_rom.hh
mmapped_ipr.hh
diff --git a/src/arch/alpha/kernel_stats.hh b/src/arch/alpha/kernel_stats.hh
deleted file mode 100644
index 4a0618e..0000000
--- a/src/arch/alpha/kernel_stats.hh
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Lisa Hsu
- * Nathan Binkert
- */
-
-#ifndef __ARCH_ALPHA_KERNEL_STATS_HH__
-#define __ARCH_ALPHA_KERNEL_STATS_HH__
-
-#include "kern/kernel_stats.hh"
-
-namespace AlphaISA {
-namespace Kernel {
-
-class Statistics : public ::Kernel::Statistics {};
-
-} // namespace Kernel
-} // namespace AlphaISA
-
-#endif // __ARCH_ALPHA_KERNEL_STATS_HH__
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh
b/src/arch/arm/fastmodel/iris/thread_context.hh
index 5acc813..daa79a3 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -215,12 +215,6 @@
panic("%s not implemented.", __FUNCTION__);
}
- Kernel::Statistics *
- getKernelStats() override
- {
- panic("%s not implemented.", __FUNCTION__);
- }
-
PortProxy &getPhysProxy() override { return *physProxy; }
PortProxy &getVirtProxy() override { return *virtProxy; }
void initMemProxies(::ThreadContext *tc) override;
diff --git a/src/arch/arm/kernel_stats.hh b/src/arch/arm/kernel_stats.hh
deleted file mode 100644
index dd184f8..0000000
--- a/src/arch/arm/kernel_stats.hh
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Gabe Black
- */
-
-#ifndef __ARCH_ARM_KERNEL_STATS_HH__
-#define __ARCH_ARM_KERNEL_STATS_HH__
-
-#include "kern/kernel_stats.hh"
-
-namespace ArmISA {
-namespace Kernel {
-
-class Statistics : public ::Kernel::Statistics
-{
- public:
- Statistics() : ::Kernel::Statistics()
- {}
-};
-
-} // namespace ArmISA::Kernel
-} // namespace ArmISA
-
-#endif // __ARCH_ARM_KERNEL_STATS_HH__
diff --git a/src/arch/mips/idle_event.cc b/src/arch/mips/idle_event.cc
index a57988c..5538440 100644
--- a/src/arch/mips/idle_event.cc
+++ b/src/arch/mips/idle_event.cc
@@ -32,7 +32,6 @@
#include "arch/mips/idle_event.hh"
-#include "arch/mips/kernel_stats.hh"
#include "cpu/thread_context.hh"
using namespace MipsISA;
diff --git a/src/arch/mips/kernel_stats.hh b/src/arch/mips/kernel_stats.hh
deleted file mode 100644
index abb964a..0000000
--- a/src/arch/mips/kernel_stats.hh
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Lisa Hsu
- * Nathan Binkert
- */
-
-#ifndef __ARCH_MIPS_KERNEL_STATS_HH__
-#define __ARCH_MIPS_KERNEL_STATS_HH__
-
-#include "kern/kernel_stats.hh"
-
-namespace MipsISA {
-namespace Kernel {
-
-class Statistics : public ::Kernel::Statistics
-{
- public:
- Statistics() : ::Kernel::Statistics()
- {}
-};
-
-} // namespace MipsISA::Kernel
-} // namespace MipsISA
-
-#endif // __ARCH_MIPS_KERNEL_STATS_HH__
diff --git a/src/arch/power/kernel_stats.hh b/src/arch/power/kernel_stats.hh
deleted file mode 100644
index 1ae77d9..0000000
--- a/src/arch/power/kernel_stats.hh
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Gabe Black
- */
-
-#ifndef __ARCH_POWER_KERNEL_STATS_HH__
-#define __ARCH_POWER_KERNEL_STATS_HH__
-
-#include "kern/kernel_stats.hh"
-
-namespace PowerISA {
-namespace Kernel {
-
-class Statistics : public ::Kernel::Statistics
-{
- public:
- Statistics() : ::Kernel::Statistics()
- {}
-};
-
-} // namespace PowerISA::Kernel
-} // namespace PowerISA
-
-#endif // __ARCH_POWER_KERNEL_STATS_HH__
diff --git a/src/arch/riscv/idle_event.cc b/src/arch/riscv/idle_event.cc
index abf1b96..44c432b 100644
--- a/src/arch/riscv/idle_event.cc
+++ b/src/arch/riscv/idle_event.cc
@@ -32,7 +32,6 @@
#include "arch/riscv/idle_event.hh"
-#include "arch/riscv/kernel_stats.hh"
#include "cpu/thread_context.hh"
using namespace RiscvISA;
diff --git a/src/arch/riscv/kernel_stats.hh b/src/arch/riscv/kernel_stats.hh
deleted file mode 100644
index a796075..0000000
--- a/src/arch/riscv/kernel_stats.hh
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Lisa Hsu
- * Nathan Binkert
- */
-
-#ifndef __ARCH_RISCV_KERNEL_STATS_HH__
-#define __ARCH_RISCV_KERNEL_STATS_HH__
-
-#include "kern/kernel_stats.hh"
-
-namespace RiscvISA {
-namespace Kernel {
-
-class Statistics : public ::Kernel::Statistics
-{
- public:
- Statistics() : ::Kernel::Statistics()
- {}
-};
-
-} // namespace RiscvISA::Kernel
-} // namespace RiscvISA
-
-#endif // __ARCH_RISCV_KERNEL_STATS_HH__
diff --git a/src/arch/sparc/kernel_stats.hh b/src/arch/sparc/kernel_stats.hh
deleted file mode 100644
index 9c13e52..0000000
--- a/src/arch/sparc/kernel_stats.hh
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Gabe Black
- */
-
-#ifndef __ARCH_SPARC_KERNEL_STATS_HH__
-#define __ARCH_SPARC_KERNEL_STATS_HH__
-
-#include <map>
-#include <stack>
-#include <string>
-#include <vector>
-
-#include "kern/kernel_stats.hh"
-
-namespace SparcISA {
-namespace Kernel {
-
-class Statistics : public ::Kernel::Statistics
-{
- public:
- Statistics() : ::Kernel::Statistics()
- {}
-};
-
-} // namespace AlphaISA::Kernel
-} // namespace AlphaISA
-
-#endif // __ARCH_SPARC_KERNEL_STATS_HH__
diff --git a/src/arch/x86/kernel_stats.hh b/src/arch/x86/kernel_stats.hh
deleted file mode 100644
index 1a821a0..0000000
--- a/src/arch/x86/kernel_stats.hh
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2007 The Hewlett-Packard Development Company
- * All rights reserved.
- *
- * The license below extends only to copyright in the software and shall
- * not be construed as granting a license to any other intellectual
- * property including but not limited to intellectual property relating
- * to a hardware implementation of the functionality of the software
- * licensed hereunder. You may use the software subject to the license
- * terms below provided that you ensure that this notice is replicated
- * unmodified and in its entirety in all distributions of the software,
- * modified or unmodified, in source code or in binary form.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Gabe Black
- */
-
-#ifndef __ARCH_X86_KERNELSTATS_HH__
-#define __ARCH_X86_KERNELSTATS_HH__
-
-#include "kern/kernel_stats.hh"
-
-namespace X86ISA {
-namespace Kernel {
-
-class Statistics : public ::Kernel::Statistics
-{
- public:
- Statistics() : ::Kernel::Statistics()
- {}
-};
-
-}
-}
-
-#endif // __ARCH_X86_KERNELSTATS_HH__
diff --git a/src/cpu/checker/cpu.cc b/src/cpu/checker/cpu.cc
index 2f020c4..6d2cdd3 100644
--- a/src/cpu/checker/cpu.cc
+++ b/src/cpu/checker/cpu.cc
@@ -103,8 +103,7 @@
systemPtr = system;
if (FullSystem) {
- thread = new SimpleThread(this, 0, systemPtr, itb, dtb,
- p->isa[0], false);
+ thread = new SimpleThread(this, 0, systemPtr, itb, dtb, p->isa[0]);
} else {
thread = new SimpleThread(this, 0, systemPtr,
workload.size() ? workload[0] : NULL,
@@ -113,7 +112,6 @@
tc = thread->getTC();
threadContexts.push_back(tc);
- thread->kernelStats = NULL;
// Thread should never be null after this
assert(thread != NULL);
}
diff --git a/src/cpu/checker/thread_context.hh
b/src/cpu/checker/thread_context.hh
index 6a7e5e1..6ae715b 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -51,12 +51,10 @@
#include "cpu/thread_context.hh"
#include "debug/Checker.hh"
-namespace Kernel {
- class Statistics;
-};
-namespace TheISA {
+namespace TheISA
+{
class Decoder;
-};
+} // namespace TheISA
/**
* Derived ThreadContext class for use with the Checker. The template
@@ -151,12 +149,6 @@
System *getSystemPtr() override { return actualTC->getSystemPtr(); }
- ::Kernel::Statistics *
- getKernelStats() override
- {
- return actualTC->getKernelStats();
- }
-
Process *getProcessPtr() override { return actualTC->getProcessPtr(); }
void setProcessPtr(Process *p) override { actualTC->setProcessPtr(p); }
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index d212303..6297216 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -47,7 +47,6 @@
#include "cpu/o3/cpu.hh"
#include "arch/generic/traits.hh"
-#include "arch/kernel_stats.hh"
#include "config/the_isa.hh"
#include "cpu/activity.hh"
#include "cpu/checker/cpu.hh"
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index 1319ca1..004b250 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -48,10 +48,6 @@
#include "cpu/o3/isa_specific.hh"
#include "cpu/thread_context.hh"
-namespace Kernel {
- class Statistics;
-}
-
/**
* Derived ThreadContext class for use with the O3CPU. It
* provides the interface for any external objects to access a
@@ -144,13 +140,6 @@
/** Returns a pointer to the system. */
System *getSystemPtr() override { return cpu->system; }
- /** Returns a pointer to this thread's kernel statistics. */
- ::Kernel::Statistics *
- getKernelStats() override
- {
- return thread->kernelStats;
- }
-
/** Returns a pointer to this thread's process. */
Process *getProcessPtr() override { return thread->getProcessPtr(); }
@@ -193,9 +182,6 @@
/** Takes over execution of a thread from another CPU. */
void takeOverFrom(ThreadContext *old_context) override;
- /** Registers statistics associated with this TC. */
- void regStats(const std::string &name) override;
-
/** Reads the last tick that this thread was activated on. */
Tick readLastActivate() override;
/** Reads the last tick that this thread was suspended on. */
diff --git a/src/cpu/o3/thread_context_impl.hh
b/src/cpu/o3/thread_context_impl.hh
index 5389407..1754cc9 100644
--- a/src/cpu/o3/thread_context_impl.hh
+++ b/src/cpu/o3/thread_context_impl.hh
@@ -46,7 +46,6 @@
#define __CPU_O3_THREAD_CONTEXT_IMPL_HH__
#include "arch/generic/traits.hh"
-#include "arch/kernel_stats.hh"
#include "arch/registers.hh"
#include "config/the_isa.hh"
#include "cpu/o3/thread_context.hh"
@@ -75,7 +74,6 @@
TheISA::Decoder *oldDecoder = old_context->getDecoderPtr();
newDecoder->takeOverFrom(oldDecoder);
- thread->kernelStats = old_context->getKernelStats();
thread->funcExeInst = old_context->readFuncExeInst();
thread->noSquashFromTC = false;
@@ -142,16 +140,6 @@
}
template <class Impl>
-void
-O3ThreadContext<Impl>::regStats(const std::string &name)
-{
- if (FullSystem) {
- thread->kernelStats = new TheISA::Kernel::Statistics();
- thread->kernelStats->regStats(name + ".kern");
- }
-}
-
-template <class Impl>
Tick
O3ThreadContext<Impl>::readLastActivate()
{
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index 75a9e19..7b02f45 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -48,7 +48,6 @@
#include <string>
#include "arch/isa_traits.hh"
-#include "arch/kernel_stats.hh"
#include "arch/stacktrace.hh"
#include "arch/utility.hh"
#include "base/callback.hh"
@@ -84,8 +83,7 @@
}
SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys,
- BaseTLB *_itb, BaseTLB *_dtb,
- TheISA::ISA *_isa, bool use_kernel_stats)
+ BaseTLB *_itb, BaseTLB *_dtb, TheISA::ISA *_isa)
: ThreadState(_cpu, _thread_num, NULL), isa(_isa),
predicate(true), memAccPredicate(true),
comInstEventQueue("instruction-based event queue"),
@@ -106,9 +104,6 @@
static ProfileNode dummyNode;
profileNode = &dummyNode;
profilePC = 3;
-
- if (use_kernel_stats)
- kernelStats = new TheISA::Kernel::Statistics();
}
void
@@ -117,7 +112,6 @@
::takeOverFrom(*this, *oldContext);
decoder.takeOverFrom(oldContext->getDecoderPtr());
- kernelStats = oldContext->getKernelStats();
funcExeInst = oldContext->readFuncExeInst();
storeCondFailures = 0;
}
@@ -198,14 +192,6 @@
baseCpu->haltContext(_threadId);
}
-
-void
-SimpleThread::regStats(const string &name)
-{
- if (FullSystem && kernelStats)
- kernelStats->regStats(name + ".kern");
-}
-
void
SimpleThread::copyArchRegs(ThreadContext *src_tc)
{
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 6076305..f0510e4 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -77,10 +77,6 @@
class FunctionProfile;
class ProfileNode;
-namespace Kernel {
- class Statistics;
-}
-
/**
* The SimpleThread object provides a combination of the ThreadState
* object and the ThreadContext interface. It implements the
@@ -144,8 +140,7 @@
// constructor: initialize SimpleThread from given process structure
// FS
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system,
- BaseTLB *_itb, BaseTLB *_dtb, TheISA::ISA *_isa,
- bool use_kernel_stats = true);
+ BaseTLB *_itb, BaseTLB *_dtb, TheISA::ISA *_isa);
// SE
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system,
Process *_process, BaseTLB *_itb, BaseTLB *_dtb,
@@ -155,8 +150,6 @@
void takeOverFrom(ThreadContext *oldContext) override;
- void regStats(const std::string &name) override;
-
void copyState(ThreadContext *oldContext);
void serialize(CheckpointOut &cp) const override;
@@ -236,12 +229,6 @@
System *getSystemPtr() override { return system; }
- Kernel::Statistics *
- getKernelStats() override
- {
- return ThreadState::getKernelStats();
- }
-
PortProxy &getPhysProxy() override { return
ThreadState::getPhysProxy(); }
PortProxy &getVirtProxy() override { return
ThreadState::getVirtProxy(); }
diff --git a/src/cpu/thread_context.cc b/src/cpu/thread_context.cc
index ec650b9..3df5ed2 100644
--- a/src/cpu/thread_context.cc
+++ b/src/cpu/thread_context.cc
@@ -50,7 +50,6 @@
#include "cpu/base.hh"
#include "debug/Context.hh"
#include "debug/Quiesce.hh"
-#include "kern/kernel_stats.hh"
#include "params/BaseCPU.hh"
#include "sim/full_system.hh"
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 893017c..0336588 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -69,9 +69,6 @@
class PortProxy;
class Process;
class System;
-namespace Kernel {
- class Statistics;
-}
/**
* ThreadContext is the external interface to all thread state for
@@ -147,8 +144,6 @@
virtual System *getSystemPtr() = 0;
- virtual ::Kernel::Statistics *getKernelStats() = 0;
-
virtual PortProxy &getPhysProxy() = 0;
virtual PortProxy &getVirtProxy() = 0;
@@ -188,7 +183,7 @@
virtual void takeOverFrom(ThreadContext *old_context) = 0;
- virtual void regStats(const std::string &name) = 0;
+ virtual void regStats(const std::string &name) {};
virtual void scheduleInstCountEvent(Event *event, Tick count) = 0;
virtual void descheduleInstCountEvent(Event *event) = 0;
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index 7e1a8a1..c02ac70 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -33,7 +33,6 @@
#include "base/output.hh"
#include "cpu/base.hh"
#include "cpu/profile.hh"
-#include "kern/kernel_stats.hh"
#include "mem/fs_translating_port_proxy.hh"
#include "mem/port.hh"
#include "mem/port_proxy.hh"
@@ -47,7 +46,7 @@
_status(ThreadContext::Halted), baseCpu(cpu),
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
profile(NULL), profileNode(NULL), profilePC(0),
- kernelStats(NULL), process(_process), physProxy(NULL),
virtProxy(NULL),
+ process(_process), physProxy(NULL), virtProxy(NULL),
funcExeInst(0), storeCondFailures(0)
{
}
@@ -66,12 +65,6 @@
SERIALIZE_ENUM(_status);
// thread_num and cpu_id are deterministic from the config
SERIALIZE_SCALAR(funcExeInst);
-
- if (!FullSystem)
- return;
-
- if (kernelStats)
- kernelStats->serialize(cp);
}
void
@@ -81,12 +74,6 @@
UNSERIALIZE_ENUM(_status);
// thread_num and cpu_id are deterministic from the config
UNSERIALIZE_SCALAR(funcExeInst);
-
- if (!FullSystem)
- return;
-
- if (kernelStats)
- kernelStats->unserialize(cp);
}
void
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 745d7b8..f200768 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -40,9 +40,6 @@
class FunctionProfile;
class ProfileNode;
-namespace Kernel {
- class Statistics;
-}
class Checkpoint;
@@ -96,8 +93,6 @@
void profileSample();
- Kernel::Statistics *getKernelStats() { return kernelStats; }
-
PortProxy &getPhysProxy();
PortProxy &getVirtProxy();
@@ -180,8 +175,6 @@
ProfileNode *profileNode;
Addr profilePC;
- Kernel::Statistics *kernelStats;
-
protected:
Process *process;
diff --git a/src/kern/kernel_stats.hh b/src/kern/kernel_stats.hh
deleted file mode 100644
index 7644bdb..0000000
--- a/src/kern/kernel_stats.hh
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Lisa Hsu
- * Nathan Binkert
- */
-
-#ifndef __KERNEL_STATS_HH__
-#define __KERNEL_STATS_HH__
-
-#include <string>
-
-#include "sim/serialize.hh"
-#include "sim/stats.hh"
-
-// What does kernel stats expect is included?
-namespace Kernel
-{
-
-class Statistics : public Serializable
-{
- protected:
- std::string myname;
-
- public:
- virtual ~Statistics() {}
-
- const std::string name() const { return myname; }
- virtual void regStats(const std::string &name) { myname = name; };
-
- void serialize(CheckpointOut &cp) const override {}
- void unserialize(CheckpointIn &cp) override {}
-};
-
-} // namespace Kernel
-
-#endif // __KERNEL_STATS_HH__
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 0823cd1..d119e12 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -73,15 +73,6 @@
#include "sim/full_system.hh"
#include "sim/redirect_path.hh"
-/**
- * To avoid linking errors with LTO, only include the header if we
- * actually have a definition.
- */
-#if THE_ISA != NULL_ISA
-#include "kern/kernel_stats.hh"
-
-#endif
-
using namespace std;
using namespace TheISA;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/25149
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ia511a59325b629aa9ccc0e695ddd47ff11916499
Gerrit-Change-Number: 25149
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev