misc: Substitute pointer to Request with aliased RequestPtr
Every usage of Request* in the code has been replaced with the RequestPtr alias. This is a preparing patch for when RequestPtr will be the typdefed to a smart pointer to Request rather then a raw pointer to Request. Change-Id: I73cbaf2d96ea9313a590cdc731a25662950cd51a Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/10995 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
This commit is contained in:
@@ -60,7 +60,7 @@ InvalidateGenerator::initiate()
|
||||
Packet::Command cmd;
|
||||
|
||||
// For simplicity, requests are assumed to be 1 byte-sized
|
||||
Request *req = new Request(m_address, 1, flags, masterId);
|
||||
RequestPtr req = new Request(m_address, 1, flags, masterId);
|
||||
|
||||
//
|
||||
// Based on the current state, issue a load or a store
|
||||
|
||||
@@ -60,7 +60,7 @@ SeriesRequestGenerator::initiate()
|
||||
Request::Flags flags;
|
||||
|
||||
// For simplicity, requests are assumed to be 1 byte-sized
|
||||
Request *req = new Request(m_address, 1, flags, masterId);
|
||||
RequestPtr req = new Request(m_address, 1, flags, masterId);
|
||||
|
||||
Packet::Command cmd;
|
||||
bool do_write = (random_mt.random(0, 100) < m_percent_writes);
|
||||
|
||||
@@ -129,7 +129,7 @@ GarnetSyntheticTraffic::init()
|
||||
void
|
||||
GarnetSyntheticTraffic::completeRequest(PacketPtr pkt)
|
||||
{
|
||||
Request *req = pkt->req;
|
||||
RequestPtr req = pkt->req;
|
||||
|
||||
DPRINTF(GarnetSyntheticTraffic,
|
||||
"Completed injection of %s packet for address %x\n",
|
||||
@@ -279,7 +279,7 @@ GarnetSyntheticTraffic::generatePkt()
|
||||
//
|
||||
MemCmd::Command requestType;
|
||||
|
||||
Request *req = nullptr;
|
||||
RequestPtr req = nullptr;
|
||||
Request::Flags flags;
|
||||
|
||||
// Inject in specific Vnet
|
||||
|
||||
@@ -136,7 +136,7 @@ MemTest::getMasterPort(const std::string &if_name, PortID idx)
|
||||
void
|
||||
MemTest::completeRequest(PacketPtr pkt, bool functional)
|
||||
{
|
||||
Request *req = pkt->req;
|
||||
RequestPtr req = pkt->req;
|
||||
assert(req->getSize() == 1);
|
||||
|
||||
// this address is no longer outstanding
|
||||
@@ -246,7 +246,7 @@ MemTest::tick()
|
||||
|
||||
bool do_functional = (random_mt.random(0, 100) < percentFunctional) &&
|
||||
!uncacheable;
|
||||
Request *req = new Request(paddr, 1, flags, masterId);
|
||||
RequestPtr req = new Request(paddr, 1, flags, masterId);
|
||||
req->setContext(id);
|
||||
|
||||
outstandingAddrs.insert(paddr);
|
||||
|
||||
@@ -107,7 +107,7 @@ Check::initiatePrefetch()
|
||||
}
|
||||
|
||||
// Prefetches are assumed to be 0 sized
|
||||
Request *req = new Request(m_address, 0, flags,
|
||||
RequestPtr req = new Request(m_address, 0, flags,
|
||||
m_tester_ptr->masterId(), curTick(), m_pc);
|
||||
req->setContext(index);
|
||||
|
||||
@@ -146,7 +146,7 @@ Check::initiateFlush()
|
||||
|
||||
Request::Flags flags;
|
||||
|
||||
Request *req = new Request(m_address, CHECK_SIZE, flags,
|
||||
RequestPtr req = new Request(m_address, CHECK_SIZE, flags,
|
||||
m_tester_ptr->masterId(), curTick(), m_pc);
|
||||
|
||||
Packet::Command cmd;
|
||||
@@ -179,7 +179,7 @@ Check::initiateAction()
|
||||
Addr writeAddr(m_address + m_store_count);
|
||||
|
||||
// Stores are assumed to be 1 byte-sized
|
||||
Request *req = new Request(writeAddr, 1, flags, m_tester_ptr->masterId(),
|
||||
RequestPtr req = new Request(writeAddr, 1, flags, m_tester_ptr->masterId(),
|
||||
curTick(), m_pc);
|
||||
|
||||
req->setContext(index);
|
||||
@@ -244,7 +244,7 @@ Check::initiateCheck()
|
||||
}
|
||||
|
||||
// Checks are sized depending on the number of bytes written
|
||||
Request *req = new Request(m_address, CHECK_SIZE, flags,
|
||||
RequestPtr req = new Request(m_address, CHECK_SIZE, flags,
|
||||
m_tester_ptr->masterId(), curTick(), m_pc);
|
||||
|
||||
req->setContext(index);
|
||||
|
||||
@@ -59,7 +59,7 @@ BaseGen::getPacket(Addr addr, unsigned size, const MemCmd& cmd,
|
||||
Request::FlagsType flags)
|
||||
{
|
||||
// Create new request
|
||||
Request *req = new Request(addr, size, flags, masterID);
|
||||
RequestPtr req = new Request(addr, size, flags, masterID);
|
||||
// Dummy PC to have PC-based prefetchers latch on; get entropy into higher
|
||||
// bits
|
||||
req->setPC(((Addr)masterID) << 2);
|
||||
|
||||
Reference in New Issue
Block a user