1d0
<
30,37c29,30
< /*
< * AddressProfiler.hh
< *
< * Description:
< *
< * $Id$
< *
< */
---
> #ifndef __MEM_RUBY_PROFILER_ADDRESSPROFILER_HH__
> #define __MEM_RUBY_PROFILER_ADDRESSPROFILER_HH__
39,41c32,34
< #ifndef ADDRESSPROFILER_H
< #define ADDRESSPROFILER_H
<
---
> #include "mem/protocol/AccessType.hh"
> #include "mem/protocol/CacheMsg.hh"
> #include "mem/ruby/common/Address.hh"
43d35
< #include "mem/ruby/system/NodeID.hh"
45,47c37
< #include "mem/ruby/common/Address.hh"
< #include "mem/protocol/CacheMsg.hh"
< #include "mem/protocol/AccessType.hh"
---
> #include "mem/ruby/system/NodeID.hh"
53,56c43,46
< class AddressProfiler {
< public:
< // Constructors
< AddressProfiler(int num_of_sequencers);
---
> class AddressProfiler
> {
> public:
> typedef Map<Address, AccessTraceForAddress> AddressMap;
58,59c48,50
< // Destructor
< ~AddressProfiler();
---
> public:
> AddressProfiler(int num_of_sequencers);
> ~AddressProfiler();
61,63c52,53
< // Public Methods
< void printStats(ostream& out) const;
< void clearStats();
---
> void printStats(ostream& out) const;
> void clearStats();
65,68c55,62
< void addTraceSample(Address data_addr, Address pc_addr, CacheRequestType type, AccessModeType access_mode, NodeID id, bool sharing_miss);
< void profileRetry(const Address& data_addr, AccessType type, int count);
< void profileGetX(const Address& datablock, const Address& PC, const Set& owner, const Set& sharers, NodeID requestor);
< void profileGetS(const Address& datablock, const Address& PC, const Set& owner, const Set& sharers, NodeID requestor);
---
> void addTraceSample(Address data_addr, Address pc_addr,
> CacheRequestType type, AccessModeType access_mode,
> NodeID id, bool sharing_miss);
> void profileRetry(const Address& data_addr, AccessType type, int count);
> void profileGetX(const Address& datablock, const Address& PC,
> const Set& owner, const Set& sharers, NodeID requestor);
> void profileGetS(const Address& datablock, const Address& PC,
> const Set& owner, const Set& sharers, NodeID requestor);
70c64
< void print(ostream& out) const;
---
> void print(ostream& out) const;
72,76c66,68
< //added by SS
< void setHotLines(bool hot_lines);
< void setAllInstructions(bool all_instructions);
< private:
< // Private Methods
---
> //added by SS
> void setHotLines(bool hot_lines);
> void setAllInstructions(bool all_instructions);
78,80c70,73
< // Private copy constructor and assignment operator
< AddressProfiler(const AddressProfiler& obj);
< AddressProfiler& operator=(const AddressProfiler& obj);
---
> private:
> // Private copy constructor and assignment operator
> AddressProfiler(const AddressProfiler& obj);
> AddressProfiler& operator=(const AddressProfiler& obj);
82,83c75
< // Data Members (m_ prefix)
< int64 m_sharing_miss_counter;
---
> int64 m_sharing_miss_counter;
85,96c77,85
< Map<Address, AccessTraceForAddress>* m_dataAccessTrace;
< Map<Address, AccessTraceForAddress>* m_macroBlockAccessTrace;
< Map<Address, AccessTraceForAddress>* m_programCounterAccessTrace;
< Map<Address, AccessTraceForAddress>* m_retryProfileMap;
< Histogram m_retryProfileHisto;
< Histogram m_retryProfileHistoWrite;
< Histogram m_retryProfileHistoRead;
< Histogram m_getx_sharing_histogram;
< Histogram m_gets_sharing_histogram;
< //added by SS
< bool m_hot_lines;
< bool m_all_instructions;
---
> AddressMap* m_dataAccessTrace;
> AddressMap* m_macroBlockAccessTrace;
> AddressMap* m_programCounterAccessTrace;
> AddressMap* m_retryProfileMap;
> Histogram m_retryProfileHisto;
> Histogram m_retryProfileHistoWrite;
> Histogram m_retryProfileHistoRead;
> Histogram m_getx_sharing_histogram;
> Histogram m_gets_sharing_histogram;
98c87,91
< int m_num_of_sequencers;
---
> //added by SS
> bool m_hot_lines;
> bool m_all_instructions;
>
> int m_num_of_sequencers;
101,108c94,95
< // Output operator declaration
< ostream& operator<<(ostream& out, const AddressProfiler& obj);
<
< // ******************* Definitions *******************
<
< // Output operator definition
< extern inline
< ostream& operator<<(ostream& out, const AddressProfiler& obj)
---
> inline ostream&
> operator<<(ostream& out, const AddressProfiler& obj)
110,112c97,99
< obj.print(out);
< out << flush;
< return out;
---
> obj.print(out);
> out << flush;
> return out;
115c102
< #endif //ADDRESSPROFILER_H
---
> #endif // __MEM_RUBY_PROFILER_ADDRESSPROFILER_HH__