Gabe Black has submitted this change. (
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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25149
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
Maintainer: Andreas Sandberg <andreas.sandb...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/SConscript
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
23 files changed, 8 insertions(+), 461 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/SConscript b/src/arch/SConscript
index 13ab8fb..978f72a 100644
--- a/src/arch/SConscript
+++ b/src/arch/SConscript
@@ -60,7 +60,6 @@
decoder.hh
isa.hh
isa_traits.hh
- kernel_stats.hh
locked_mem.hh
microcode_rom.hh
pseudo_inst.hh
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh
b/src/arch/arm/fastmodel/iris/thread_context.hh
index 6b16069..5a4efd5 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -216,12 +216,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 4eb10a5..0000000
--- a/src/arch/arm/kernel_stats.hh
+++ /dev/null
@@ -1,47 +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.
- */
-
-#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 6c593bd..a2b3b0c 100644
--- a/src/arch/mips/idle_event.cc
+++ b/src/arch/mips/idle_event.cc
@@ -28,7 +28,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 065d73a..0000000
--- a/src/arch/mips/kernel_stats.hh
+++ /dev/null
@@ -1,47 +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.
- */
-
-#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 f1eabfd..0000000
--- a/src/arch/power/kernel_stats.hh
+++ /dev/null
@@ -1,47 +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.
- */
-
-#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 5b56c27..88256b9 100644
--- a/src/arch/riscv/idle_event.cc
+++ b/src/arch/riscv/idle_event.cc
@@ -28,7 +28,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 6435bcb..0000000
--- a/src/arch/riscv/kernel_stats.hh
+++ /dev/null
@@ -1,47 +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.
- */
-
-#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 41a8dd0..0000000
--- a/src/arch/sparc/kernel_stats.hh
+++ /dev/null
@@ -1,52 +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.
- */
-
-#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 SparcISA::Kernel
-} // namespace SparcISA
-
-#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 44980d4..0000000
--- a/src/arch/x86/kernel_stats.hh
+++ /dev/null
@@ -1,56 +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.
- */
-
-#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 b62a5c6..d9d6d7e 100644
--- a/src/cpu/checker/cpu.cc
+++ b/src/cpu/checker/cpu.cc
@@ -99,8 +99,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,
@@ -109,7 +108,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 52ea7d2..18f4068 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -50,12 +50,10 @@
#include "debug/Checker.hh"
class EndQuiesceEvent;
-namespace Kernel {
- class Statistics;
-};
-namespace TheISA {
+namespace TheISA
+{
class Decoder;
-};
+} // namespace TheISA
/**
* Derived ThreadContext class for use with the Checker. The template
@@ -150,12 +148,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 b3faf31..21bcf56 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -43,7 +43,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 3cb3e97..042ad1c 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -47,9 +47,6 @@
#include "cpu/thread_context.hh"
class EndQuiesceEvent;
-namespace Kernel {
- class Statistics;
-}
/**
* Derived ThreadContext class for use with the O3CPU. It
@@ -143,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(); }
@@ -192,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 d02be71..034b989 100644
--- a/src/cpu/o3/thread_context_impl.hh
+++ b/src/cpu/o3/thread_context_impl.hh
@@ -43,7 +43,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"
@@ -76,7 +75,6 @@
TheISA::Decoder *oldDecoder = old_context->getDecoderPtr();
newDecoder->takeOverFrom(oldDecoder);
- thread->kernelStats = old_context->getKernelStats();
thread->funcExeInst = old_context->readFuncExeInst();
thread->noSquashFromTC = false;
@@ -143,16 +141,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 d0c6bf4..20ada33 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -43,7 +43,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"
@@ -83,8 +82,7 @@
}
SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys,
- BaseTLB *_itb, BaseTLB *_dtb,
- BaseISA *_isa, bool use_kernel_stats)
+ BaseTLB *_itb, BaseTLB *_dtb, BaseISA *_isa)
: ThreadState(_cpu, _thread_num, NULL),
isa(dynamic_cast<TheISA::ISA *>(_isa)),
predicate(true), memAccPredicate(true),
@@ -110,9 +108,6 @@
static ProfileNode dummyNode;
profileNode = &dummyNode;
profilePC = 3;
-
- if (use_kernel_stats)
- kernelStats = new TheISA::Kernel::Statistics();
}
void
@@ -123,7 +118,6 @@
isa->takeOverFrom(this, oldContext);
- 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 6118541..9e6a2a7 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -74,10 +74,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
@@ -141,8 +137,7 @@
// constructor: initialize SimpleThread from given process structure
// FS
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system,
- BaseTLB *_itb, BaseTLB *_dtb, BaseISA *_isa,
- bool use_kernel_stats = true);
+ BaseTLB *_itb, BaseTLB *_dtb, BaseISA *_isa);
// SE
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system,
Process *_process, BaseTLB *_itb, BaseTLB *_dtb,
@@ -152,8 +147,6 @@
void takeOverFrom(ThreadContext *oldContext) override;
- void regStats(const std::string &name) override;
-
void copyState(ThreadContext *oldContext);
void serialize(CheckpointOut &cp) const override;
@@ -232,12 +225,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 1930739..83ed552 100644
--- a/src/cpu/thread_context.cc
+++ b/src/cpu/thread_context.cc
@@ -49,7 +49,6 @@
#include "cpu/quiesce_event.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 4907b84..fdd6b8a 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -68,9 +68,6 @@
class PortProxy;
class Process;
class System;
-namespace Kernel {
- class Statistics;
-}
/**
* ThreadContext is the external interface to all thread state for
@@ -146,8 +143,6 @@
virtual System *getSystemPtr() = 0;
- virtual ::Kernel::Statistics *getKernelStats() = 0;
-
virtual PortProxy &getPhysProxy() = 0;
virtual PortProxy &getVirtProxy() = 0;
@@ -187,7 +182,7 @@
virtual void takeOverFrom(ThreadContext *old_context) = 0;
- virtual void regStats(const std::string &name) = 0;
+ virtual void regStats(const std::string &name) {};
virtual EndQuiesceEvent *getQuiesceEvent() = 0;
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index 07176b7..741d119 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -32,7 +32,6 @@
#include "cpu/base.hh"
#include "cpu/profile.hh"
#include "cpu/quiesce_event.hh"
-#include "kern/kernel_stats.hh"
#include "mem/port.hh"
#include "mem/port_proxy.hh"
#include "mem/se_translating_port_proxy.hh"
@@ -46,7 +45,7 @@
_status(ThreadContext::Halted), baseCpu(cpu),
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
profile(NULL), profileNode(NULL), profilePC(0), quiesceEvent(NULL),
- kernelStats(NULL), process(_process), physProxy(NULL),
virtProxy(NULL),
+ process(_process), physProxy(NULL), virtProxy(NULL),
funcExeInst(0), storeCondFailures(0)
{
}
@@ -73,8 +72,6 @@
if (quiesceEvent->scheduled())
quiesceEndTick = quiesceEvent->when();
SERIALIZE_SCALAR(quiesceEndTick);
- if (kernelStats)
- kernelStats->serialize(cp);
}
void
@@ -92,8 +89,6 @@
UNSERIALIZE_SCALAR(quiesceEndTick);
if (quiesceEndTick)
baseCpu->schedule(quiesceEvent, quiesceEndTick);
- if (kernelStats)
- kernelStats->unserialize(cp);
}
void
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index dd93c68..1bbf446 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -39,9 +39,6 @@
class EndQuiesceEvent;
class FunctionProfile;
class ProfileNode;
-namespace Kernel {
- class Statistics;
-}
class Checkpoint;
@@ -94,8 +91,6 @@
void profileSample();
- Kernel::Statistics *getKernelStats() { return kernelStats; }
-
PortProxy &getPhysProxy();
PortProxy &getVirtProxy();
@@ -166,8 +161,6 @@
Addr profilePC;
EndQuiesceEvent *quiesceEvent;
- 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 0fbbca4..0000000
--- a/src/kern/kernel_stats.hh
+++ /dev/null
@@ -1,58 +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.
- */
-
-#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 557ad7d..2bd7815 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -67,15 +67,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: develop
Gerrit-Change-Id: Ia511a59325b629aa9ccc0e695ddd47ff11916499
Gerrit-Change-Number: 25149
Gerrit-PatchSet: 40
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Brandon Potter <brandon.pot...@amd.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Gem5 Cloud Project GCB service account
<345032938...@cloudbuild.gserviceaccount.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s