36 #include "mem/ruby/protocol/RubyRequest.hh"
46 using gem5::stl_helpers::operator<<;
59 record_map.insert(std::make_pair(
addr, dflt));
60 AddressMap::iterator
i =
r.first;
73 const AddressMap &record_map, std::string description,
76 const int records_printed = 100;
81 AddressMap::const_iterator
i = record_map.begin();
82 AddressMap::const_iterator end = record_map.end();
83 for (;
i != end; ++
i) {
86 sorted.push_back(record);
90 out <<
"Total_entries_" << description <<
": " << record_map.size()
93 out <<
"Total_Instructions_" << description <<
": " << misses
96 out <<
"Total_data_misses_" << description <<
": " << misses
100 out <<
"total | load store atomic | user supervisor | sharing | touched-by"
111 m_touched_vec.resize(num_of_sequencers+1);
112 m_touched_weighted_vec.resize(num_of_sequencers+1);
113 for (
int j = 0;
j < m_touched_vec.size();
j++) {
114 m_touched_vec[
j] = 0;
115 m_touched_weighted_vec[
j] = 0;
119 int max = sorted.size();
120 while (counter < max && counter < records_printed) {
122 double percent = 100.0 * (record->
getTotal() / double(misses));
123 out << description <<
" | " << percent <<
" % " << *record
132 while (counter < max) {
142 out <<
"all_records_" << description <<
": "
143 << all_records << std::endl
144 <<
"all_records_log_" << description <<
": "
145 << all_records_log << std::endl
146 <<
"remaining_records_" << description <<
": "
147 << remaining_records << std::endl
148 <<
"remaining_records_log_" << description <<
": "
149 << remaining_records_log << std::endl
150 <<
"touched_by_" << description <<
": "
151 << m_touched_vec << std::endl
152 <<
"touched_by_weighted_" << description <<
": "
153 << m_touched_weighted_vec << std::endl
158 : m_profiler(profiler)
185 out <<
"AddressProfiler Stats" << std::endl;
186 out <<
"---------------------" << std::endl;
196 out <<
"Hot Data Blocks" << std::endl;
197 out <<
"---------------" << std::endl;
203 out <<
"Hot MacroData Blocks" << std::endl;
204 out <<
"--------------------" << std::endl;
209 out <<
"Hot Instructions" << std::endl;
210 out <<
"----------------" << std::endl;
218 out <<
"All Instructions Profile:" << std::endl;
219 out <<
"-------------------------" << std::endl;
227 out <<
"Retry Profile" << std::endl;
228 out <<
"-------------" << std::endl;
237 out <<
"retry_histogram_percent: ";
265 const Set& owner,
const Set& sharers,
269 indirection_set.
addSet(sharers);
270 indirection_set.
addSet(owner);
271 indirection_set.
remove(requestor);
272 int num_indirections = indirection_set.
count();
275 bool indirection_miss = (num_indirections > 0);
277 addTraceSample(datablock, PC, RubyRequestType_ST, RubyAccessMode(0),
278 requestor, indirection_miss);
283 const Set& owner,
const Set& sharers,
287 indirection_set.
addSet(owner);
288 indirection_set.
remove(requestor);
289 int num_indirections = indirection_set.
count();
292 bool indirection_miss = (num_indirections > 0);
294 addTraceSample(datablock, PC, RubyRequestType_LD, RubyAccessMode(0),
295 requestor, indirection_miss);
300 RubyRequestType
type,
301 RubyAccessMode access_mode,
NodeID id,
312 update(
type, access_mode,
id, sharing_miss);
317 Addr macro_addr = mbits<Addr>(data_addr, 63, 10);
319 update(
type, access_mode,
id, sharing_miss);
323 update(
type, access_mode,
id, sharing_miss);
331 update(
type, access_mode,
id, sharing_miss);
339 if (
type == AccessType_Read) {