|
gem5 [DEVELOP-FOR-25.0]
|
#include <CacheRecorder.hh>
Public Member Functions | |
| CacheRecorder ()=delete | |
| CacheRecorder (uint8_t *uncompressed_trace, uint64_t uncompressed_trace_size, std::vector< RubyPort * > &ruby_port_map, uint64_t trace_block_size_bytes, uint64_t system_block_size_bytes) | |
| ~CacheRecorder () | |
| 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) |
| uint64_t | getNumRecords () const |
| void | enqueueNextFlushRequest () |
| Function for flushing the memory contents of the caches to the main memory. | |
| void | enqueueNextFetchRequest () |
| Function for fetching warming up the memory and the caches. | |
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< RubyPort * > | m_ruby_port_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 73 of file CacheRecorder.hh.
|
delete |
References data.
Referenced by CacheRecorder(), and operator=().
| gem5::ruby::CacheRecorder::CacheRecorder | ( | uint8_t * | uncompressed_trace, |
| uint64_t | uncompressed_trace_size, | ||
| std::vector< RubyPort * > & | ruby_port_map, | ||
| uint64_t | trace_block_size_bytes, | ||
| uint64_t | system_block_size_bytes ) |
Definition at line 52 of file CacheRecorder.cc.
References m_block_size_bytes, m_bytes_read, m_records_flushed, m_records_read, m_ruby_port_map, m_uncompressed_trace, m_uncompressed_trace_size, and panic.
| gem5::ruby::CacheRecorder::~CacheRecorder | ( | ) |
Definition at line 75 of file CacheRecorder.cc.
References m_ruby_port_map, and m_uncompressed_trace.
|
private |
References CacheRecorder().
| void gem5::ruby::CacheRecorder::addRecord | ( | int | cntrl, |
| Addr | data_addr, | ||
| Addr | pc_addr, | ||
| RubyRequestType | type, | ||
| Tick | time, | ||
| DataBlock & | data ) |
Definition at line 166 of file CacheRecorder.cc.
References data, DPRINTF, m_block_size_bytes, gem5::ruby::TraceRecord::m_cntrl_id, gem5::ruby::TraceRecord::m_data, gem5::ruby::TraceRecord::m_data_address, gem5::ruby::TraceRecord::m_pc_address, m_records, gem5::ruby::TraceRecord::m_time, and gem5::ruby::TraceRecord::m_type.
Referenced by gem5::ruby::CacheMemory::recordCacheContents().
| uint64_t gem5::ruby::CacheRecorder::aggregateRecords | ( | uint8_t ** | data, |
| uint64_t | size ) |
Definition at line 185 of file CacheRecorder.cc.
References gem5::ruby::compareTraceRecords(), fatal, gem5::ArmISA::i, m_block_size_bytes, and m_records.
| void gem5::ruby::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 113 of file CacheRecorder.cc.
References gem5::Packet::dataStatic(), DPRINTF, gem5::exitSimLoop(), gem5::Request::funcRequestorId, gem5::Request::INST_FETCH, m_block_size_bytes, m_bytes_read, gem5::ruby::TraceRecord::m_cntrl_id, gem5::ruby::TraceRecord::m_data, gem5::ruby::TraceRecord::m_data_address, m_records_read, m_ruby_port_map, gem5::ruby::TraceRecord::m_type, m_uncompressed_trace, m_uncompressed_trace_size, gem5::ruby::RubyPort::makeRequest(), gem5::MemCmd::ReadReq, gem5::Packet::req, and gem5::MemCmd::WriteReq.
| void gem5::ruby::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 85 of file CacheRecorder.cc.
References DPRINTF, gem5::exitSimLoop(), gem5::MemCmd::FlushReq, gem5::Request::funcRequestorId, m_block_size_bytes, gem5::ruby::TraceRecord::m_cntrl_id, gem5::ruby::TraceRecord::m_data_address, m_records, m_records_flushed, m_ruby_port_map, gem5::ruby::RubyPort::makeRequest(), and gem5::Packet::req.
| uint64_t gem5::ruby::CacheRecorder::getNumRecords | ( | ) | const |
Definition at line 221 of file CacheRecorder.cc.
References m_records.
|
private |
References CacheRecorder().
|
private |
Definition at line 123 of file CacheRecorder.hh.
Referenced by addRecord(), aggregateRecords(), CacheRecorder(), enqueueNextFetchRequest(), and enqueueNextFlushRequest().
|
private |
Definition at line 120 of file CacheRecorder.hh.
Referenced by CacheRecorder(), and enqueueNextFetchRequest().
|
private |
Definition at line 116 of file CacheRecorder.hh.
Referenced by addRecord(), aggregateRecords(), enqueueNextFlushRequest(), and getNumRecords().
|
private |
Definition at line 122 of file CacheRecorder.hh.
Referenced by CacheRecorder(), and enqueueNextFlushRequest().
|
private |
Definition at line 121 of file CacheRecorder.hh.
Referenced by CacheRecorder(), and enqueueNextFetchRequest().
|
private |
Definition at line 119 of file CacheRecorder.hh.
Referenced by CacheRecorder(), enqueueNextFetchRequest(), enqueueNextFlushRequest(), and ~CacheRecorder().
|
private |
Definition at line 117 of file CacheRecorder.hh.
Referenced by CacheRecorder(), enqueueNextFetchRequest(), and ~CacheRecorder().
|
private |
Definition at line 118 of file CacheRecorder.hh.
Referenced by CacheRecorder(), and enqueueNextFetchRequest().