AccessTraceForAddress.hh (7455:586f99bf0dc4) | AccessTraceForAddress.hh (7456:8b9be6e12c9b) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 46 unchanged lines hidden (view full) --- 55 int getTotal() const; 56 int getSharing() const { return m_sharing; } 57 int getTouchedBy() const { return m_touched_by.count(); } 58 const Address& getAddress() const { return m_addr; } 59 void addSample(int value); 60 61 void print(std::ostream& out) const; 62 | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 46 unchanged lines hidden (view full) --- 55 int getTotal() const; 56 int getSharing() const { return m_sharing; } 57 int getTouchedBy() const { return m_touched_by.count(); } 58 const Address& getAddress() const { return m_addr; } 59 void addSample(int value); 60 61 void print(std::ostream& out) const; 62 |
63 static inline bool 64 less_equal(const AccessTraceForAddress* n1, 65 const AccessTraceForAddress* n2) 66 { 67 return n1->getTotal() <= n2->getTotal(); 68 } 69 |
|
63 private: 64 Address m_addr; 65 uint64 m_loads; 66 uint64 m_stores; 67 uint64 m_atomics; 68 uint64 m_total; 69 uint64 m_user; 70 uint64 m_sharing; 71 Set m_touched_by; 72 Histogram* m_histogram_ptr; 73}; 74 | 70 private: 71 Address m_addr; 72 uint64 m_loads; 73 uint64 m_stores; 74 uint64 m_atomics; 75 uint64 m_total; 76 uint64 m_user; 77 uint64 m_sharing; 78 Set m_touched_by; 79 Histogram* m_histogram_ptr; 80}; 81 |
75inline bool 76node_less_then_eq(const AccessTraceForAddress* n1, 77 const AccessTraceForAddress* n2) 78{ 79 return n1->getTotal() > n2->getTotal(); 80} 81 | |
82inline std::ostream& 83operator<<(std::ostream& out, const AccessTraceForAddress& obj) 84{ 85 obj.print(out); 86 out << std::flush; 87 return out; 88} 89 90#endif // __MEM_RUBY_PROFILER_ACCESSTRACEFORADDRESS_HH__ | 82inline std::ostream& 83operator<<(std::ostream& out, const AccessTraceForAddress& obj) 84{ 85 obj.print(out); 86 out << std::flush; 87 return out; 88} 89 90#endif // __MEM_RUBY_PROFILER_ACCESSTRACEFORADDRESS_HH__ |