CacheRecorder.cc (10302:0e9e99e6369a) | CacheRecorder.cc (10653:e3fc6bc7f97e) |
---|---|
1/* 2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood 3 * Copyright (c) 2010 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 95 unchanged lines hidden (view full) --- 104 if (m_bytes_read < m_uncompressed_trace_size) { 105 TraceRecord* traceRecord = (TraceRecord*) (m_uncompressed_trace + 106 m_bytes_read); 107 108 DPRINTF(RubyCacheTrace, "Issuing %s\n", *traceRecord); 109 110 for (int rec_bytes_read = 0; rec_bytes_read < m_block_size_bytes; 111 rec_bytes_read += RubySystem::getBlockSizeBytes()) { | 1/* 2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood 3 * Copyright (c) 2010 Advanced Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 95 unchanged lines hidden (view full) --- 104 if (m_bytes_read < m_uncompressed_trace_size) { 105 TraceRecord* traceRecord = (TraceRecord*) (m_uncompressed_trace + 106 m_bytes_read); 107 108 DPRINTF(RubyCacheTrace, "Issuing %s\n", *traceRecord); 109 110 for (int rec_bytes_read = 0; rec_bytes_read < m_block_size_bytes; 111 rec_bytes_read += RubySystem::getBlockSizeBytes()) { |
112 Request* req = new Request(); | 112 Request* req = nullptr; |
113 MemCmd::Command requestType; 114 115 if (traceRecord->m_type == RubyRequestType_LD) { 116 requestType = MemCmd::ReadReq; | 113 MemCmd::Command requestType; 114 115 if (traceRecord->m_type == RubyRequestType_LD) { 116 requestType = MemCmd::ReadReq; |
117 req->setPhys(traceRecord->m_data_address + rec_bytes_read, | 117 req = new Request(traceRecord->m_data_address + rec_bytes_read, |
118 RubySystem::getBlockSizeBytes(), 0, Request::funcMasterId); 119 } else if (traceRecord->m_type == RubyRequestType_IFETCH) { 120 requestType = MemCmd::ReadReq; | 118 RubySystem::getBlockSizeBytes(), 0, Request::funcMasterId); 119 } else if (traceRecord->m_type == RubyRequestType_IFETCH) { 120 requestType = MemCmd::ReadReq; |
121 req->setPhys(traceRecord->m_data_address + rec_bytes_read, | 121 req = new Request(traceRecord->m_data_address + rec_bytes_read, |
122 RubySystem::getBlockSizeBytes(), 123 Request::INST_FETCH, Request::funcMasterId); 124 } else { 125 requestType = MemCmd::WriteReq; | 122 RubySystem::getBlockSizeBytes(), 123 Request::INST_FETCH, Request::funcMasterId); 124 } else { 125 requestType = MemCmd::WriteReq; |
126 req->setPhys(traceRecord->m_data_address + rec_bytes_read, | 126 req = new Request(traceRecord->m_data_address + rec_bytes_read, |
127 RubySystem::getBlockSizeBytes(), 0, Request::funcMasterId); 128 } 129 130 Packet *pkt = new Packet(req, requestType); 131 pkt->dataStatic(traceRecord->m_data + rec_bytes_read); 132 133 Sequencer* m_sequencer_ptr = m_seq_map[traceRecord->m_cntrl_id]; 134 assert(m_sequencer_ptr != NULL); --- 61 unchanged lines hidden --- | 127 RubySystem::getBlockSizeBytes(), 0, Request::funcMasterId); 128 } 129 130 Packet *pkt = new Packet(req, requestType); 131 pkt->dataStatic(traceRecord->m_data + rec_bytes_read); 132 133 Sequencer* m_sequencer_ptr = m_seq_map[traceRecord->m_cntrl_id]; 134 assert(m_sequencer_ptr != NULL); --- 61 unchanged lines hidden --- |