diff options
author | Nathan Binkert <nate@binkert.org> | 2010-06-10 23:17:07 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-06-10 23:17:07 -0700 |
commit | dd133c7b24aba128546d24e6042b0e0d46673aaf (patch) | |
tree | 60f82f2f2b708a0fdb6967a7bf1262b435b5e6e0 /src/mem/ruby/profiler/AccessTraceForAddress.hh | |
parent | 3df84fd8a0ce3959c0deb4c206d910fc0d050f47 (diff) | |
download | gem5-dd133c7b24aba128546d24e6042b0e0d46673aaf.tar.xz |
ruby: get rid of PrioHeap and use STL
One big difference is that PrioHeap puts the smallest element at the
top of the heap, whereas stl puts the largest element on top, so I
changed all comparisons so they did the right thing.
Some usage of PrioHeap was simply changed to a std::vector, using sort
at the right time, other usage had me just use the various heap functions
in the stl.
Diffstat (limited to 'src/mem/ruby/profiler/AccessTraceForAddress.hh')
-rw-r--r-- | src/mem/ruby/profiler/AccessTraceForAddress.hh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/ruby/profiler/AccessTraceForAddress.hh b/src/mem/ruby/profiler/AccessTraceForAddress.hh index a707cd4df..b950f2be2 100644 --- a/src/mem/ruby/profiler/AccessTraceForAddress.hh +++ b/src/mem/ruby/profiler/AccessTraceForAddress.hh @@ -60,6 +60,13 @@ class AccessTraceForAddress void print(std::ostream& out) const; + static inline bool + less_equal(const AccessTraceForAddress* n1, + const AccessTraceForAddress* n2) + { + return n1->getTotal() <= n2->getTotal(); + } + private: Address m_addr; uint64 m_loads; @@ -72,13 +79,6 @@ class AccessTraceForAddress Histogram* m_histogram_ptr; }; -inline bool -node_less_then_eq(const AccessTraceForAddress* n1, - const AccessTraceForAddress* n2) -{ - return n1->getTotal() > n2->getTotal(); -} - inline std::ostream& operator<<(std::ostream& out, const AccessTraceForAddress& obj) { |