From 34e77161fb42847797338ffe95674f248798ab43 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Fri, 28 Jun 2019 10:04:43 +0100 Subject: cpu: isDrained renamed to isCpuDrained cpu models inheriting from BaseCPU implement a draining checker called isDrained. This hides the base Drainable::isDrained method and might create confusion in the reader. This patch is renaming it to isCpuDrained in order to avoid any ambiguity Change-Id: Ie5221da6a4673432c2403996e42d451cae960bbf Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19468 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/cpu/o3/cpu.cc | 10 +++++----- src/cpu/o3/cpu.hh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/cpu/o3') diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index f2e0f60b7..920bef02c 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -1022,7 +1022,7 @@ FullO3CPU::drain() // Wake the CPU and record activity so everything can drain out if // the CPU was not able to immediately drain. - if (!isDrained()) { + if (!isCpuDrained()) { // If a thread is suspended, wake it up so it can be drained for (auto t : threadContexts) { if (t->status() == ThreadContext::Suspended){ @@ -1048,7 +1048,7 @@ FullO3CPU::drain() // Flush out any old data from the time buffers. In // particular, there might be some data in flight from the // fetch stage that isn't visible in any of the CPU buffers we - // test in isDrained(). + // test in isCpuDrained(). for (int i = 0; i < timeBuffer.getSize(); ++i) { timeBuffer.advance(); fetchQueue.advance(); @@ -1066,7 +1066,7 @@ template bool FullO3CPU::tryDrain() { - if (drainState() != DrainState::Draining || !isDrained()) + if (drainState() != DrainState::Draining || !isCpuDrained()) return false; if (tickEvent.scheduled()) @@ -1082,7 +1082,7 @@ template void FullO3CPU::drainSanityCheck() const { - assert(isDrained()); + assert(isCpuDrained()); fetch.drainSanityCheck(); decode.drainSanityCheck(); rename.drainSanityCheck(); @@ -1092,7 +1092,7 @@ FullO3CPU::drainSanityCheck() const template bool -FullO3CPU::isDrained() const +FullO3CPU::isCpuDrained() const { bool drained(true); diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh index db8fca20a..68ad95b18 100644 --- a/src/cpu/o3/cpu.hh +++ b/src/cpu/o3/cpu.hh @@ -248,7 +248,7 @@ class FullO3CPU : public BaseO3CPU void drainSanityCheck() const; /** Check if a system is in a drained state. */ - bool isDrained() const; + bool isCpuDrained() const; public: /** Constructs a CPU with the given parameters. */ -- cgit v1.2.3