diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-10 18:33:11 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-10 18:33:11 -0800 |
commit | 140785d24c27f3afddbe95c9e504e27bf8274290 (patch) | |
tree | cc4d27a7d4e417a6cd0f0364cff3db67ca1825b7 /src/mem/ruby/profiler/CacheProfiler.hh | |
parent | 1badec39a94397397a3c918bfcc75c71efc507ea (diff) | |
download | gem5-140785d24c27f3afddbe95c9e504e27bf8274290.tar.xz |
ruby: get rid of std-includes.hh
Do not use "using namespace std;" in headers
Include header files as needed
Diffstat (limited to 'src/mem/ruby/profiler/CacheProfiler.hh')
-rw-r--r-- | src/mem/ruby/profiler/CacheProfiler.hh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mem/ruby/profiler/CacheProfiler.hh b/src/mem/ruby/profiler/CacheProfiler.hh index 6c5fbb988..11f189148 100644 --- a/src/mem/ruby/profiler/CacheProfiler.hh +++ b/src/mem/ruby/profiler/CacheProfiler.hh @@ -39,6 +39,9 @@ #ifndef CACHEPROFILER_H #define CACHEPROFILER_H +#include <iostream> +#include <string> + #include "mem/ruby/common/Global.hh" #include "mem/ruby/system/NodeID.hh" #include "mem/ruby/common/Histogram.hh" @@ -51,18 +54,18 @@ template <class TYPE> class Vector; class CacheProfiler { public: // Constructors - CacheProfiler(const string& description); + CacheProfiler(const std::string& description); // Destructor ~CacheProfiler(); // Public Methods - void printStats(ostream& out) const; + void printStats(std::ostream& out) const; void clearStats(); void addStatSample(CacheRequestType requestType, AccessModeType type, int msgSize, PrefetchBit pfBit); - void print(ostream& out) const; + void print(std::ostream& out) const; private: // Private Methods @@ -71,7 +74,7 @@ private: CacheProfiler& operator=(const CacheProfiler& obj); // Data Members (m_ prefix) - string m_description; + std::string m_description; Histogram m_requestSize; int64 m_misses; int64 m_demand_misses; @@ -84,16 +87,16 @@ private: }; // Output operator declaration -ostream& operator<<(ostream& out, const CacheProfiler& obj); +std::ostream& operator<<(std::ostream& out, const CacheProfiler& obj); // ******************* Definitions ******************* // Output operator definition extern inline -ostream& operator<<(ostream& out, const CacheProfiler& obj) +std::ostream& operator<<(std::ostream& out, const CacheProfiler& obj) { obj.print(out); - out << flush; + out << std::flush; return out; } |