mem: Remove unused 'using namespace'
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Fri, 30 Mar 2018 09:20:27 +0000 (11:20 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Fri, 6 Apr 2018 08:38:06 +0000 (08:38 +0000)
Removal of unused/barely used 'using namespace' from C++ files.

Change-Id: I66dc548c04506db2e41180b9ea7ab5abd7d5375a
Reviewed-on: https://gem5-review.googlesource.com/9601
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

14 files changed:
src/mem/cache/mshr.cc
src/mem/cache/mshr_queue.cc
src/mem/cache/tags/base.cc
src/mem/cache/tags/base_set_assoc.cc
src/mem/cache/tags/fa_lru.cc
src/mem/cache/write_queue.cc
src/mem/cache/write_queue_entry.cc
src/mem/dram_ctrl.cc
src/mem/drampower.cc
src/mem/fs_translating_port_proxy.cc
src/mem/mem_checker_monitor.cc
src/mem/packet_queue.cc
src/mem/page_table.cc
src/mem/simple_mem.cc

index 493b7f02101a5fc04b70a79c36cfc1c6cad5c341..cc26b56514c8731bf56117ecad040a5c75e51634 100644 (file)
@@ -60,8 +60,6 @@
 #include "mem/cache/cache.hh"
 #include "sim/core.hh"
 
-using namespace std;
-
 MSHR::MSHR() : downstreamPending(false),
                pendingModified(false),
                postInvalidate(false), postDowngrade(false),
@@ -617,7 +615,7 @@ MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const
 std::string
 MSHR::print() const
 {
-    ostringstream str;
+    std::ostringstream str;
     print(str);
     return str.str();
 }
index f4992e1769f6fdab5c333c31ede9c5f909176986..29358d73780774f4a396f2aa55ddf3e9fddcbe7c 100644 (file)
@@ -47,8 +47,6 @@
 
 #include "mem/cache/mshr_queue.hh"
 
-using namespace std;
-
 MSHRQueue::MSHRQueue(const std::string &_label,
                      int num_entries, int reserve, int demand_reserve)
     : Queue<MSHR>(_label, num_entries, reserve),
index d467019f6ac10f92bc2b042765731790e8555f0f..d48acfbe1052a0fa0a198f23d5ce2e5e035f98e8 100644 (file)
@@ -52,8 +52,6 @@
 #include "mem/cache/base.hh"
 #include "sim/sim_exit.hh"
 
-using namespace std;
-
 BaseTags::BaseTags(const Params *p)
     : ClockedObject(p), blkSize(p->block_size), blkMask(blkSize - 1),
       size(p->size),
index 0ab806ee95ef03467c8ae6c19eeecc7e3dc46ad1..ac0e06f9515a5255766a7462dd06b34b9d94e11e 100644 (file)
@@ -52,8 +52,6 @@
 #include "base/intmath.hh"
 #include "sim/core.hh"
 
-using namespace std;
-
 BaseSetAssoc::BaseSetAssoc(const Params *p)
     :BaseTags(p), assoc(p->assoc), allocAssoc(p->assoc),
      blks(p->size / p->block_size),
index 652abc36003494a0842af012c7a91988e3c58ca7..f02b55a8d2ce5fa1e11c712699b5db619ca61e9e 100644 (file)
@@ -53,8 +53,6 @@
 #include "base/intmath.hh"
 #include "base/logging.hh"
 
-using namespace std;
-
 FALRU::FALRU(const Params *p)
     : BaseTags(p), cacheBoundaries(nullptr)
 {
@@ -122,7 +120,6 @@ FALRU::~FALRU()
 void
 FALRU::regStats()
 {
-    using namespace Stats;
     BaseTags::regStats();
     hits
         .init(numCaches+1)
@@ -140,7 +137,7 @@ FALRU::regStats()
         ;
 
     for (unsigned i = 0; i <= numCaches; ++i) {
-        stringstream size_str;
+        std::stringstream size_str;
         if (i < 3){
             size_str << (1<<(i+7)) <<"K";
         } else {
index 7a876b32674521f09bbf6558faa8121a5890750f..13e0fc5194fce11eb8f6d99881ea726f7ed8631e 100644 (file)
@@ -48,8 +48,6 @@
 
 #include "mem/cache/write_queue.hh"
 
-using namespace std;
-
 WriteQueue::WriteQueue(const std::string &_label,
                        int num_entries, int reserve)
     : Queue<WriteQueueEntry>(_label, num_entries, reserve)
index 663c231faf9c8f5f661c9110b13661a71135af9c..b8275e13e3ddeba8b6b40bf6c75d2bac389ca02b 100644 (file)
@@ -61,8 +61,6 @@
 #include "mem/cache/cache.hh"
 #include "sim/core.hh"
 
-using namespace std;
-
 inline void
 WriteQueueEntry::TargetList::add(PacketPtr pkt, Tick readyTime,
                                  Counter order)
@@ -163,7 +161,7 @@ WriteQueueEntry::print(std::ostream &os, int verbosity,
 std::string
 WriteQueueEntry::print() const
 {
-    ostringstream str;
+    std::ostringstream str;
     print(str);
     return str.str();
 }
index 62de18de77db5af3e3d787cf9ce605c4835a7f58..fed519d660d82cc5fdc4c151af1f9c6dae76bb83 100644 (file)
@@ -2302,8 +2302,6 @@ DRAMCtrl::Rank::resetStats() {
 void
 DRAMCtrl::Rank::regStats()
 {
-    using namespace Stats;
-
     pwrStateTime
         .init(6)
         .name(name() + ".memoryStateTime")
@@ -2367,8 +2365,8 @@ DRAMCtrl::Rank::regStats()
         .name(name() + ".totalIdleTime")
         .desc("Total Idle time Per DRAM Rank");
 
-    registerDumpCallback(new RankDumpCallback(this));
-    registerResetCallback(new RankResetCallback(this));
+    Stats::registerDumpCallback(new RankDumpCallback(this));
+    Stats::registerResetCallback(new RankResetCallback(this));
 }
 void
 DRAMCtrl::regStats()
index d491c96129634103bb1a722b8fbd60b0b20d7ad8..c4cdfb9cce133f0da0c9c88996503b808b3d728c 100644 (file)
@@ -42,8 +42,6 @@
 #include "base/intmath.hh"
 #include "sim/core.hh"
 
-using namespace Data;
-
 DRAMPower::DRAMPower(const DRAMCtrlParams* p, bool include_io) :
     powerlib(libDRAMPower(getMemSpec(p), include_io))
 {
index ef86bf77b8feeae2536cc9b024d3b947f9669438..15ad8238c11bc5931db0cc1726165ae7e750af99 100644 (file)
@@ -54,8 +54,6 @@
 #include "cpu/thread_context.hh"
 #include "sim/system.hh"
 
-using namespace TheISA;
-
 FSTranslatingPortProxy::FSTranslatingPortProxy(ThreadContext *tc)
     : PortProxy(tc->getCpuPtr()->getDataPort(),
                 tc->getSystemPtr()->cacheLineSize()), _tc(tc)
index 2a25d21ab677349fae7894132fdbf1ec441dc11a..c58ac54fa462d4c3e2331a868074fb3ad1753c72 100644 (file)
@@ -47,8 +47,6 @@
 #include "base/trace.hh"
 #include "debug/MemCheckerMonitor.hh"
 
-using namespace std;
-
 MemCheckerMonitor::MemCheckerMonitor(Params* params)
     : MemObject(params),
       masterPort(name() + "-master", *this),
index 7649fe5a6198a167c494db28f9987a32a101449f..a630f1f5f170db14516c96f8aba9046d9f07167c 100644 (file)
@@ -47,8 +47,6 @@
 #include "debug/Drain.hh"
 #include "debug/PacketQueue.hh"
 
-using namespace std;
-
 PacketQueue::PacketQueue(EventManager& _em, const std::string& _label,
                          const std::string& _sendEventName,
                          bool disable_sanity_check)
index d771479d005801b9d836fd5022bdbb1c553b8ccd..8abeb29846ae98daa756d347e90734c70e1cb441 100644 (file)
@@ -45,8 +45,6 @@
 #include "sim/faults.hh"
 #include "sim/serialize.hh"
 
-using namespace std;
-
 void
 EmulationPageTable::map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags)
 {
@@ -100,7 +98,7 @@ void
 EmulationPageTable::getMappings(std::vector<std::pair<Addr, Addr>> *addr_maps)
 {
     for (auto &iter : pTable)
-        addr_maps->push_back(make_pair(iter.first, iter.second.paddr));
+        addr_maps->push_back(std::make_pair(iter.first, iter.second.paddr));
 }
 
 void
index 8358a828b1b0e77741b51232b073bb5e34e2c15d..6914ac4f6522f8aac28f4872658a4a7d9fb8ae3a 100644 (file)
@@ -48,8 +48,6 @@
 #include "base/trace.hh"
 #include "debug/Drain.hh"
 
-using namespace std;
-
 SimpleMemory::SimpleMemory(const SimpleMemoryParams* p) :
     AbstractMemory(p),
     port(name() + ".port", *this), latency(p->latency),