gem5
|
#include <CacheRecorder.hh>
Public Member Functions | |
CacheRecorder () | |
~CacheRecorder () | |
CacheRecorder (uint8_t *uncompressed_trace, uint64_t uncompressed_trace_size, std::vector< Sequencer * > &SequencerMap, uint64_t block_size_bytes) | |
void | addRecord (int cntrl, Addr data_addr, Addr pc_addr, RubyRequestType type, Tick time, DataBlock &data) |
uint64_t | aggregateRecords (uint8_t **data, uint64_t size) |
void | enqueueNextFlushRequest () |
Function for flushing the memory contents of the caches to the main memory. More... | |
void | enqueueNextFetchRequest () |
Function for fetching warming up the memory and the caches. More... | |
Private Member Functions | |
CacheRecorder (const CacheRecorder &obj) | |
CacheRecorder & | operator= (const CacheRecorder &obj) |
Private Attributes | |
std::vector< TraceRecord * > | m_records |
uint8_t * | m_uncompressed_trace |
uint64_t | m_uncompressed_trace_size |
std::vector< Sequencer * > | m_seq_map |
uint64_t | m_bytes_read |
uint64_t | m_records_read |
uint64_t | m_records_flushed |
uint64_t | m_block_size_bytes |
Definition at line 66 of file CacheRecorder.hh.
CacheRecorder::CacheRecorder | ( | ) |
Definition at line 46 of file CacheRecorder.cc.
CacheRecorder::~CacheRecorder | ( | ) |
Definition at line 73 of file CacheRecorder.cc.
References m_seq_map, and m_uncompressed_trace.
CacheRecorder::CacheRecorder | ( | uint8_t * | uncompressed_trace, |
uint64_t | uncompressed_trace_size, | ||
std::vector< Sequencer * > & | SequencerMap, | ||
uint64_t | block_size_bytes | ||
) |
Definition at line 53 of file CacheRecorder.cc.
References RubySystem::getBlockSizeBytes(), m_block_size_bytes, m_uncompressed_trace, and panic.
|
private |
void CacheRecorder::addRecord | ( | int | cntrl, |
Addr | data_addr, | ||
Addr | pc_addr, | ||
RubyRequestType | type, | ||
Tick | time, | ||
DataBlock & | data | ||
) |
Definition at line 149 of file CacheRecorder.cc.
References DataBlock::getData(), m_block_size_bytes, TraceRecord::m_cntrl_id, TraceRecord::m_data, TraceRecord::m_data_address, TraceRecord::m_pc_address, m_records, TraceRecord::m_time, TraceRecord::m_type, and X86ISA::type.
Referenced by CacheMemory::recordCacheContents().
uint64_t CacheRecorder::aggregateRecords | ( | uint8_t ** | data, |
uint64_t | size | ||
) |
Definition at line 166 of file CacheRecorder.cc.
References compareTraceRecords(), fatal, ArmISA::i, m_block_size_bytes, m_records, and X86ISA::size().
Referenced by RubySystem::serialize().
void CacheRecorder::enqueueNextFetchRequest | ( | ) |
Function for fetching warming up the memory and the caches.
It goes through the recorded contents of the caches, as available in the checkpoint and issues fetch requests. Except for the first one, a fetch request is issued only after the previous one has completed. It should be possible to use this with any protocol.
Definition at line 105 of file CacheRecorder.cc.
References Packet::dataStatic(), DPRINTF, Request::funcMasterId, RubySystem::getBlockSizeBytes(), Request::INST_FETCH, m_block_size_bytes, m_bytes_read, TraceRecord::m_cntrl_id, TraceRecord::m_data, TraceRecord::m_data_address, m_records_read, m_seq_map, TraceRecord::m_type, m_uncompressed_trace, m_uncompressed_trace_size, Sequencer::makeRequest(), MemCmd::ReadReq, and MemCmd::WriteReq.
Referenced by Sequencer::hitCallback(), and RubySystem::RubyEvent::process().
void CacheRecorder::enqueueNextFlushRequest | ( | ) |
Function for flushing the memory contents of the caches to the main memory.
It goes through the recorded contents of the caches, and issues flush requests. Except for the first one, a flush request is issued only after the previous one has completed. This currently requires use of MOESI Hammer protocol since only that protocol supports flush requests.
Definition at line 83 of file CacheRecorder.cc.
References DPRINTF, MemCmd::FlushReq, Request::funcMasterId, m_block_size_bytes, TraceRecord::m_cntrl_id, TraceRecord::m_data_address, m_records, m_records_flushed, m_seq_map, and Sequencer::makeRequest().
Referenced by Sequencer::hitCallback(), and RubySystem::RubyEvent::process().
|
private |
|
private |
Definition at line 112 of file CacheRecorder.hh.
Referenced by addRecord(), aggregateRecords(), CacheRecorder(), enqueueNextFetchRequest(), and enqueueNextFlushRequest().
|
private |
Definition at line 109 of file CacheRecorder.hh.
Referenced by enqueueNextFetchRequest().
|
private |
Definition at line 105 of file CacheRecorder.hh.
Referenced by addRecord(), aggregateRecords(), and enqueueNextFlushRequest().
|
private |
Definition at line 111 of file CacheRecorder.hh.
Referenced by enqueueNextFlushRequest().
|
private |
Definition at line 110 of file CacheRecorder.hh.
Referenced by enqueueNextFetchRequest().
|
private |
Definition at line 108 of file CacheRecorder.hh.
Referenced by enqueueNextFetchRequest(), enqueueNextFlushRequest(), and ~CacheRecorder().
|
private |
Definition at line 106 of file CacheRecorder.hh.
Referenced by CacheRecorder(), enqueueNextFetchRequest(), and ~CacheRecorder().
|
private |
Definition at line 107 of file CacheRecorder.hh.
Referenced by enqueueNextFetchRequest().