diff options
Diffstat (limited to 'src/mem/ruby/common')
-rw-r--r-- | src/mem/ruby/common/DataBlock.hh | 2 | ||||
-rw-r--r-- | src/mem/ruby/common/Histogram.cc | 2 | ||||
-rw-r--r-- | src/mem/ruby/common/Histogram.hh | 10 | ||||
-rw-r--r-- | src/mem/ruby/common/SubBlock.cc | 7 | ||||
-rw-r--r-- | src/mem/ruby/common/SubBlock.hh | 7 | ||||
-rw-r--r-- | src/mem/ruby/common/TypeDefines.hh | 3 |
6 files changed, 19 insertions, 12 deletions
diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index 129a88e25..ac08fac82 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -67,8 +67,6 @@ class DataBlock private: void alloc(); uint8_t *m_data; - //! true if this DataBlock is responsible for deleting m_data, - //! false otherwise. bool m_alloc; }; diff --git a/src/mem/ruby/common/Histogram.cc b/src/mem/ruby/common/Histogram.cc index 31de160cf..e377bc253 100644 --- a/src/mem/ruby/common/Histogram.cc +++ b/src/mem/ruby/common/Histogram.cc @@ -84,7 +84,7 @@ Histogram::doubleBinSize() } void -Histogram::add(int64_t value) +Histogram::add(int64 value) { assert(value >= 0); m_max = max(m_max, value); diff --git a/src/mem/ruby/common/Histogram.hh b/src/mem/ruby/common/Histogram.hh index f02c4bedd..c34e39af1 100644 --- a/src/mem/ruby/common/Histogram.hh +++ b/src/mem/ruby/common/Histogram.hh @@ -40,7 +40,7 @@ class Histogram Histogram(int binsize = 1, uint32_t bins = 50); ~Histogram(); - void add(int64_t value); + void add(int64 value); void add(Histogram& hist); void doubleBinSize(); @@ -51,10 +51,10 @@ class Histogram uint64_t size() const { return m_count; } uint32_t getBins() const { return m_data.size(); } int getBinSize() const { return m_binsize; } - int64_t getTotal() const { return m_sumSamples; } + int64 getTotal() const { return m_sumSamples; } uint64_t getSquaredTotal() const { return m_sumSquaredSamples; } uint64_t getData(int index) const { return m_data[index]; } - int64_t getMax() const { return m_max; } + int64 getMax() const { return m_max; } void printWithMultiplier(std::ostream& out, double multiplier) const; void printPercent(std::ostream& out) const; @@ -62,12 +62,12 @@ class Histogram private: std::vector<uint64_t> m_data; - int64_t m_max; // the maximum value seen so far + int64 m_max; // the maximum value seen so far uint64_t m_count; // the number of elements added int m_binsize; // the size of each bucket uint32_t m_largest_bin; // the largest bin used - int64_t m_sumSamples; // the sum of all samples + int64 m_sumSamples; // the sum of all samples uint64_t m_sumSquaredSamples; // the sum of the square of all samples double getStandardDeviation() const; diff --git a/src/mem/ruby/common/SubBlock.cc b/src/mem/ruby/common/SubBlock.cc index f1839df72..5175cb950 100644 --- a/src/mem/ruby/common/SubBlock.cc +++ b/src/mem/ruby/common/SubBlock.cc @@ -41,7 +41,7 @@ SubBlock::SubBlock(Addr addr, int size) } void -SubBlock::mergeFrom(const DataBlock& data) +SubBlock::internalMergeFrom(const DataBlock& data) { int size = getSize(); assert(size > 0); @@ -52,7 +52,7 @@ SubBlock::mergeFrom(const DataBlock& data) } void -SubBlock::mergeTo(DataBlock& data) const +SubBlock::internalMergeTo(DataBlock& data) const { int size = getSize(); assert(size > 0); @@ -68,3 +68,6 @@ SubBlock::print(std::ostream& out) const { out << "[" << m_address << ", " << getSize() << ", " << m_data << "]"; } + + + diff --git a/src/mem/ruby/common/SubBlock.hh b/src/mem/ruby/common/SubBlock.hh index f336328fa..ad1d68ae1 100644 --- a/src/mem/ruby/common/SubBlock.hh +++ b/src/mem/ruby/common/SubBlock.hh @@ -56,12 +56,15 @@ class SubBlock // Merging to and from DataBlocks - We only need to worry about // updates when we are using DataBlocks - void mergeTo(DataBlock& data) const; - void mergeFrom(const DataBlock& data); + void mergeTo(DataBlock& data) const { internalMergeTo(data); } + void mergeFrom(const DataBlock& data) { internalMergeFrom(data); } void print(std::ostream& out) const; private: + void internalMergeTo(DataBlock& data) const; + void internalMergeFrom(const DataBlock& data); + // Data Members (m_ prefix) Addr m_address; std::vector<uint8_t> m_data; diff --git a/src/mem/ruby/common/TypeDefines.hh b/src/mem/ruby/common/TypeDefines.hh index f29efe8b5..203b63779 100644 --- a/src/mem/ruby/common/TypeDefines.hh +++ b/src/mem/ruby/common/TypeDefines.hh @@ -30,6 +30,9 @@ #ifndef TYPEDEFINES_H #define TYPEDEFINES_H +typedef unsigned long long uint64; +typedef long long int64; + typedef unsigned int LinkID; typedef unsigned int NodeID; typedef unsigned int SwitchID; |