32 #include "debug/RubyCacheTrace.hh"
41 out <<
"[TraceRecord: Node, " << m_cntrl_id <<
", "
42 << m_data_address <<
", " << m_pc_address <<
", "
43 << m_type <<
", Time: " << m_time <<
"]";
47 : m_uncompressed_trace(NULL),
48 m_uncompressed_trace_size(0),
49 m_block_size_bytes(
RubySystem::getBlockSizeBytes())
54 uint64_t uncompressed_trace_size,
56 uint64_t block_size_bytes)
57 : m_uncompressed_trace(uncompressed_trace),
58 m_uncompressed_trace_size(uncompressed_trace_size),
59 m_seq_map(seq_map), m_bytes_read(0), m_records_read(0),
60 m_records_flushed(0), m_block_size_bytes(block_size_bytes)
67 panic(
"Recorded cache block size (%d) < current block size (%d) !!",
95 assert(m_sequencer_ptr != NULL);
98 DPRINTF(RubyCacheTrace,
"Flushing %s\n", *rec);
111 DPRINTF(RubyCacheTrace,
"Issuing %s\n", *traceRecord);
118 if (traceRecord->
m_type == RubyRequestType_LD) {
122 }
else if (traceRecord->
m_type == RubyRequestType_IFETCH) {
137 assert(m_sequencer_ptr != NULL);
171 uint64_t current_size = 0;
174 for (
int i = 0;
i <
size; ++
i) {
176 if (current_size + record_size > total_size) {
177 uint8_t* new_buf =
new (nothrow) uint8_t[total_size * 2];
178 if (new_buf == NULL) {
179 fatal(
"Unable to allocate buffer of size %s\n",
182 total_size = total_size * 2;
183 uint8_t* old_buf = *buf;
184 memcpy(new_buf, old_buf, current_size);
190 memcpy(&((*buf)[current_size]),
m_records[
i], record_size);
191 current_size += record_size;
void enqueueNextFetchRequest()
Function for fetching warming up the memory and the caches.
This master id is used for functional requests that don't come from a particular device.
void print(std::ostream &out) const
uint64_t aggregateRecords(uint8_t **data, uint64_t size)
void addRecord(int cntrl, Addr data_addr, Addr pc_addr, RubyRequestType type, Tick time, DataBlock &data)
std::vector< TraceRecord * > m_records
void dataStatic(T *p)
Set the data pointer to the following value that should not be freed.
Class for recording cache contents.
std::vector< Sequencer * > m_seq_map
void enqueueNextFlushRequest()
Function for flushing the memory contents of the caches to the main memory.
uint64_t m_records_flushed
uint64_t Tick
Tick count type.
uint64_t m_block_size_bytes
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool compareTraceRecords(const TraceRecord *n1, const TraceRecord *n2)
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
uint8_t * m_uncompressed_trace
const uint8_t * getData(int offset, int len) const
The request was an instruction fetch.
uint64_t m_uncompressed_trace_size
Command
List of all commands associated with a packet.
RequestStatus makeRequest(PacketPtr pkt)
static uint32_t getBlockSizeBytes()
ProbePointArg< PacketInfo > Packet
Packet probe point.