From 3952e41ab1f1dfaa2f97a6a486528e4ea0bfc5a1 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 2 Jan 2008 12:20:15 -0800 Subject: Add functional PrintReq command for memory-system debugging. --HG-- extra : convert_revision : 73b753e57c355b7e6873f047ddc8cb371c3136b7 --- src/cpu/memtest/memtest.cc | 7 +++++++ src/cpu/memtest/memtest.hh | 2 ++ src/cpu/o3/cpu.cc | 17 ++++++++--------- 3 files changed, 17 insertions(+), 9 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/memtest/memtest.cc b/src/cpu/memtest/memtest.cc index f8c8a0547..e2acff4ca 100644 --- a/src/cpu/memtest/memtest.cc +++ b/src/cpu/memtest/memtest.cc @@ -399,3 +399,10 @@ MemTestParams::create() { return new MemTest(this); } + + +void +MemTest::printAddr(Addr a) +{ + cachePort.printAddr(a); +} diff --git a/src/cpu/memtest/memtest.hh b/src/cpu/memtest/memtest.hh index 1c918df33..eb0c822f1 100644 --- a/src/cpu/memtest/memtest.hh +++ b/src/cpu/memtest/memtest.hh @@ -62,6 +62,8 @@ class MemTest : public MemObject virtual Port *getPort(const std::string &if_name, int idx = -1); + void printAddr(Addr a); + protected: class TickEvent : public Event { diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 3842d27bd..5908062aa 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -52,7 +52,6 @@ #include "cpu/checker/cpu.hh" #endif -using namespace std; using namespace TheISA; BaseO3CPU::BaseO3CPU(Params *params) @@ -521,8 +520,8 @@ template void FullO3CPU::activateThread(unsigned tid) { - list::iterator isActive = find( - activeThreads.begin(), activeThreads.end(), tid); + std::list::iterator isActive = + std::find(activeThreads.begin(), activeThreads.end(), tid); DPRINTF(O3CPU, "[tid:%i]: Calling activate thread.\n", tid); @@ -539,8 +538,8 @@ void FullO3CPU::deactivateThread(unsigned tid) { //Remove From Active List, if Active - list::iterator thread_it = - find(activeThreads.begin(), activeThreads.end(), tid); + std::list::iterator thread_it = + std::find(activeThreads.begin(), activeThreads.end(), tid); DPRINTF(O3CPU, "[tid:%i]: Calling deactivate thread.\n", tid); @@ -959,8 +958,8 @@ FullO3CPU::takeOverFrom(BaseCPU *oldCPU) // the active threads list. int tid = 0; - list::iterator isActive = find( - activeThreads.begin(), activeThreads.end(), tid); + std::list::iterator isActive = + std::find(activeThreads.begin(), activeThreads.end(), tid); if (isActive == activeThreads.end()) { //May Need to Re-code this if the delay variable is the delay @@ -1454,8 +1453,8 @@ FullO3CPU::updateThreadPriority() { //DEFAULT TO ROUND ROBIN SCHEME //e.g. Move highest priority to end of thread list - list::iterator list_begin = activeThreads.begin(); - list::iterator list_end = activeThreads.end(); + std::list::iterator list_begin = activeThreads.begin(); + std::list::iterator list_end = activeThreads.end(); unsigned high_thread = *list_begin; -- cgit v1.2.3