1d0
<
30,35c29,30
< /*
< * $Id$
< *
< * Description:
< *
< */
---
> #ifndef __MEM_RUBY_PROFILER_STORETRACE_HH__
> #define __MEM_RUBY_PROFILER_STORETRACE_HH__
37,40d31
< #ifndef StoreTrace_H
< #define StoreTrace_H
<
< #include "mem/ruby/common/Global.hh"
41a33
> #include "mem/ruby/common/Global.hh"
44,48c36,41
< class StoreTrace {
< public:
< // Constructors
< StoreTrace() { }
< explicit StoreTrace(const Address& addr);
---
> class StoreTrace
> {
> public:
> StoreTrace() { }
> explicit StoreTrace(const Address& addr);
> ~StoreTrace();
50,51c43,48
< // Destructor
< ~StoreTrace();
---
> void store(NodeID node);
> void downgrade(NodeID node);
> int getTotal() const { return m_total_samples; }
> static void initSummary();
> static void printSummary(ostream& out);
> static void clearSummary();
53,59c50
< // Public Methods
< void store(NodeID node);
< void downgrade(NodeID node);
< int getTotal() const { return m_total_samples; }
< static void initSummary();
< static void printSummary(ostream& out);
< static void clearSummary();
---
> void print(ostream& out) const;
61,63c52,59
< void print(ostream& out) const;
< private:
< // Private Methods
---
> private:
> static bool s_init;
> static int64 s_total_samples; // Total number of store lifetimes
> // of all lines
> static Histogram* s_store_count_ptr;
> static Histogram* s_store_first_to_stolen_ptr;
> static Histogram* s_store_last_to_stolen_ptr;
> static Histogram* s_store_first_to_last_ptr;
65,67c61,65
< // Private copy constructor and assignment operator
< // StoreTrace(const StoreTrace& obj);
< // StoreTrace& operator=(const StoreTrace& obj);
---
> Address m_addr;
> NodeID m_last_writer;
> Time m_first_store;
> Time m_last_store;
> int m_stores_this_interval;
69,89c67,71
< // Class Members (s_ prefix)
< static bool s_init;
< static int64 s_total_samples; // Total number of store lifetimes of all lines
< static Histogram* s_store_count_ptr;
< static Histogram* s_store_first_to_stolen_ptr;
< static Histogram* s_store_last_to_stolen_ptr;
< static Histogram* s_store_first_to_last_ptr;
<
< // Data Members (m_ prefix)
<
< Address m_addr;
< NodeID m_last_writer;
< Time m_first_store;
< Time m_last_store;
< int m_stores_this_interval;
<
< int64 m_total_samples; // Total number of store lifetimes of this line
< Histogram m_store_count;
< Histogram m_store_first_to_stolen;
< Histogram m_store_last_to_stolen;
< Histogram m_store_first_to_last;
---
> int64 m_total_samples; // Total number of store lifetimes of this line
> Histogram m_store_count;
> Histogram m_store_first_to_stolen;
> Histogram m_store_last_to_stolen;
> Histogram m_store_first_to_last;
92c74,78
< bool node_less_then_eq(const StoreTrace* n1, const StoreTrace* n2);
---
> inline bool
> node_less_then_eq(const StoreTrace* n1, const StoreTrace* n2)
> {
> return n1->getTotal() > n2->getTotal();
> }
94,101c80,81
< // Output operator declaration
< ostream& operator<<(ostream& out, const StoreTrace& obj);
<
< // ******************* Definitions *******************
<
< // Output operator definition
< extern inline
< ostream& operator<<(ostream& out, const StoreTrace& obj)
---
> inline ostream&
> operator<<(ostream& out, const StoreTrace& obj)
103,105c83,85
< obj.print(out);
< out << flush;
< return out;
---
> obj.print(out);
> out << flush;
> return out;
108c88
< #endif //StoreTrace_H
---
> #endif // __MEM_RUBY_PROFILER_STORETRACE_HH__