gem5  v21.1.0.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::ruby::CacheRecorder Class Reference

#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)
 
CacheRecorderoperator= (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
 

Detailed Description

Definition at line 73 of file CacheRecorder.hh.

Constructor & Destructor Documentation

◆ CacheRecorder() [1/3]

gem5::ruby::CacheRecorder::CacheRecorder ( )

Definition at line 50 of file CacheRecorder.cc.

◆ ~CacheRecorder()

gem5::ruby::CacheRecorder::~CacheRecorder ( )

Definition at line 77 of file CacheRecorder.cc.

References m_seq_map, and m_uncompressed_trace.

◆ CacheRecorder() [2/3]

gem5::ruby::CacheRecorder::CacheRecorder ( uint8_t *  uncompressed_trace,
uint64_t  uncompressed_trace_size,
std::vector< Sequencer * > &  SequencerMap,
uint64_t  block_size_bytes 
)

◆ CacheRecorder() [3/3]

gem5::ruby::CacheRecorder::CacheRecorder ( const CacheRecorder obj)
private

Member Function Documentation

◆ addRecord()

void gem5::ruby::CacheRecorder::addRecord ( int  cntrl,
Addr  data_addr,
Addr  pc_addr,
RubyRequestType  type,
Tick  time,
DataBlock data 
)

◆ aggregateRecords()

uint64_t gem5::ruby::CacheRecorder::aggregateRecords ( uint8_t **  data,
uint64_t  size 
)

◆ enqueueNextFetchRequest()

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 109 of file CacheRecorder.cc.

References gem5::Packet::dataStatic(), DPRINTF, gem5::Request::funcRequestorId, gem5::ruby::RubySystem::getBlockSizeBytes(), 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_seq_map, gem5::ruby::TraceRecord::m_type, m_uncompressed_trace, m_uncompressed_trace_size, gem5::ruby::Sequencer::makeRequest(), gem5::MemCmd::ReadReq, and gem5::MemCmd::WriteReq.

Referenced by gem5::ruby::RubySystem::processRubyEvent().

◆ enqueueNextFlushRequest()

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 87 of file CacheRecorder.cc.

References DPRINTF, 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_seq_map, and gem5::ruby::Sequencer::makeRequest().

Referenced by gem5::ruby::RubySystem::processRubyEvent().

◆ operator=()

CacheRecorder& gem5::ruby::CacheRecorder::operator= ( const CacheRecorder obj)
private

Member Data Documentation

◆ m_block_size_bytes

uint64_t gem5::ruby::CacheRecorder::m_block_size_bytes
private

◆ m_bytes_read

uint64_t gem5::ruby::CacheRecorder::m_bytes_read
private

Definition at line 116 of file CacheRecorder.hh.

Referenced by enqueueNextFetchRequest().

◆ m_records

std::vector<TraceRecord*> gem5::ruby::CacheRecorder::m_records
private

Definition at line 112 of file CacheRecorder.hh.

Referenced by addRecord(), aggregateRecords(), and enqueueNextFlushRequest().

◆ m_records_flushed

uint64_t gem5::ruby::CacheRecorder::m_records_flushed
private

Definition at line 118 of file CacheRecorder.hh.

Referenced by enqueueNextFlushRequest().

◆ m_records_read

uint64_t gem5::ruby::CacheRecorder::m_records_read
private

Definition at line 117 of file CacheRecorder.hh.

Referenced by enqueueNextFetchRequest().

◆ m_seq_map

std::vector<Sequencer*> gem5::ruby::CacheRecorder::m_seq_map
private

◆ m_uncompressed_trace

uint8_t* gem5::ruby::CacheRecorder::m_uncompressed_trace
private

Definition at line 113 of file CacheRecorder.hh.

Referenced by CacheRecorder(), enqueueNextFetchRequest(), and ~CacheRecorder().

◆ m_uncompressed_trace_size

uint64_t gem5::ruby::CacheRecorder::m_uncompressed_trace_size
private

Definition at line 114 of file CacheRecorder.hh.

Referenced by enqueueNextFetchRequest().


The documentation for this class was generated from the following files:

Generated on Tue Sep 21 2021 12:32:03 for gem5 by doxygen 1.8.17