diff options
author | Sean Wilson <spwilson2@wisc.edu> | 2017-06-07 15:02:52 -0500 |
---|---|---|
committer | Sean Wilson <spwilson2@wisc.edu> | 2017-06-20 18:03:21 +0000 |
commit | 8421362cc23a6341e44ce59f2c4f578438fd8a55 (patch) | |
tree | e191487970e04fcf9cf4640b9ce6a1ca965ab70d /src/mem/cache | |
parent | d0b477475135f7d216fcdfa5a2c22266234801bc (diff) | |
download | gem5-8421362cc23a6341e44ce59f2c4f578438fd8a55.tar.xz |
mem: Replace EventWrapper use with EventFunctionWrapper
NOTE: With this change there is a possibility for `DRAMCtrl::Rank`s
event names to not properly match the rank they were generated by. This
could occur if the public rank member is modified after the Rank's
construction. A patch would mean refactoring Rank and `DRAMCtrl`b to
privatize many of the members of Rank behind getters.
Change-Id: I7b8bd15086f4ffdfd3f40be4aeddac5e786fd78e
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3745
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache')
-rw-r--r-- | src/mem/cache/base.cc | 3 | ||||
-rw-r--r-- | src/mem/cache/base.hh | 3 | ||||
-rw-r--r-- | src/mem/cache/cache.cc | 3 | ||||
-rw-r--r-- | src/mem/cache/cache.hh | 3 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc index 7f08d173e..6f2532371 100644 --- a/src/mem/cache/base.cc +++ b/src/mem/cache/base.cc @@ -62,7 +62,8 @@ BaseCache::CacheSlavePort::CacheSlavePort(const std::string &_name, BaseCache *_cache, const std::string &_label) : QueuedSlavePort(_name, _cache, queue), queue(*_cache, *this, _label), - blocked(false), mustSendRetry(false), sendRetryEvent(this) + blocked(false), mustSendRetry(false), + sendRetryEvent([this]{ processSendRetry(); }, _name) { } diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh index 2787eea8c..2f4b934b3 100644 --- a/src/mem/cache/base.hh +++ b/src/mem/cache/base.hh @@ -177,8 +177,7 @@ class BaseCache : public MemObject void processSendRetry(); - EventWrapper<CacheSlavePort, - &CacheSlavePort::processSendRetry> sendRetryEvent; + EventFunctionWrapper sendRetryEvent; }; diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index 09148100e..fdc14a7c0 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -73,7 +73,8 @@ Cache::Cache(const CacheParams *p) clusivity(p->clusivity), writebackClean(p->writeback_clean), tempBlockWriteback(nullptr), - writebackTempBlockAtomicEvent(this, false, + writebackTempBlockAtomicEvent([this]{ writebackTempBlockAtomic(); }, + name(), false, EventBase::Delayed_Writeback_Pri) { tempBlock = new CacheBlk(); diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh index e5c8ab61f..9d135c652 100644 --- a/src/mem/cache/cache.hh +++ b/src/mem/cache/cache.hh @@ -257,8 +257,7 @@ class Cache : public BaseCache * finishes. To avoid other calls to recvAtomic getting in * between, we create this event with a higher priority. */ - EventWrapper<Cache, &Cache::writebackTempBlockAtomic> \ - writebackTempBlockAtomicEvent; + EventFunctionWrapper writebackTempBlockAtomicEvent; /** * Store the outstanding requests that we are expecting snoop |