Hi, everyone,
Recently I strive to collect L2 cache (LLC) hit/miss time histogram. When I
check it at the source code, I found that the Profiler.hh (in
src/mem/ruby/profiler) have created histograms for each MachineType (L1Cache,
L2Cache, etc.):
//! Histograms for profiling the latencies for requests that
//! did not required external messages.
std::vector<Stats::Histogram *> m_hitMachLatencyHistSeqr;
std::vector< std::vector<Stats::Histogram *> > m_hitTypeMachLatencyHistSeqr;
......
std::vector<Stats::Histogram *> m_missMachLatencyHistSeqr;
std::vector< std::vector<Stats::Histogram *> >
m_missTypeMachLatencyHistSeqr;
The m_hitMachLatencyHistSeqr will add histograms from each Sequencer (at
Profiler::collateStats() src/mem/ruby/profiler/Profiler.cc):
// add the per machine type miss latencies
for (uint32_t j = 0; j < MachineType_NUM; ++j) {
m_hitMachLatencyHistSeqr[j]
->add(seq->getHitMachLatencyHist(j));
......
}
The m_histMachLatencyHist of each Sequencer will record the latency and the
MachineType finally at Sequencer.read/writeCallback():
The protocol I use is MESI_Two_Level, so I check the MESI_Two_Level-L1Cache.sm
(src/mem/protocol), and found that the argument MachineType have been not
passed to the readCallback():
// This is one action which invokes readCallback(). Other actions like
h_load_hit/h_ifetch_hit/hh_store_hit/hhx_store_hit also invoke readCallback or
writeCallback.
action(hx_load_hit, "hx", desc="Notify sequencer the load completed.")
{
assert(is_valid(cache_entry));
DPRINTF(RubySlicc, "%s\n", cache_entry.DataBlk);
L1Icache.setMRU(address);
L1Dcache.setMRU(address);
sequencer.readCallback(address, cache_entry.DataBlk, true);
}
// These are three function prototypes of readCallback() (at
srm/mem/protocol/RubySlicc_Types.sm)
void readCallback(Addr, DataBlock);
void readCallback(Addr, DataBlock, bool);
void readCallback(Addr, DataBlock, bool, MachineType);
When I check the stats.txt, these histograms are not printed in the file.
(Because no data of any valid MachineType histogram is recorded, and the
histograms are zero). So I think it needs to add the argument MachineType to
the read/writeCallback() as below (reference to learning gem5
http://learning.gem5.org/book/part3/MSI/cache-actions.html):
sequencer.readCallback(address, cache_entry.DataBlk, true,
machineIDToMachineType(in_msg.Sender));
I am wondering since the Profiler has owned these histograms, why they are not
collected actually?
I am not quite familar with SLICC and the protocol MESI_Two_Level, so could any
one give me some hints on modify these actions?
Thank you!
Zicong
--
Zicong Wang >>> sent from NUDT mailbox_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users