diff options
author | Sean Wilson <spwilson2@wisc.edu> | 2017-06-28 13:34:02 -0500 |
---|---|---|
committer | Sean Wilson <spwilson2@wisc.edu> | 2017-07-12 20:07:05 +0000 |
commit | fc575f8266149c78b29bcbe12ab86ccb7614ffbf (patch) | |
tree | 8f6ad3a6af8a5b4c529638b94ceb7a897d6192fb /src/mem/ruby/system/GPUCoalescer.cc | |
parent | 381aa8498997f5ce93480511f7514be85356687a (diff) | |
download | gem5-fc575f8266149c78b29bcbe12ab86ccb7614ffbf.tar.xz |
ruby: Refactor some Event subclasses to lambdas
Change-Id: I9f47a20a869553515a759d9a29c05f6ce4b42d64
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3930
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/ruby/system/GPUCoalescer.cc')
-rw-r--r-- | src/mem/ruby/system/GPUCoalescer.cc | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mem/ruby/system/GPUCoalescer.cc b/src/mem/ruby/system/GPUCoalescer.cc index 991b21717..a615c40fd 100644 --- a/src/mem/ruby/system/GPUCoalescer.cc +++ b/src/mem/ruby/system/GPUCoalescer.cc @@ -116,7 +116,10 @@ reqSegmentToHSASegment(Request* req) } GPUCoalescer::GPUCoalescer(const Params *p) - : RubyPort(p), issueEvent(this), deadlockCheckEvent(this) + : RubyPort(p), + issueEvent([this]{ completeIssue(); }, "Issue coalesced request", + false, Event::Progress_Event_Pri), + deadlockCheckEvent([this]{ wakeup(); }, "GPUCoalescer deadlock check") { m_store_waiting_on_load_cycles = 0; m_store_waiting_on_store_cycles = 0; @@ -996,11 +999,6 @@ GPUCoalescer::recordRequestType(SequencerRequestType requestType) { SequencerRequestType_to_string(requestType)); } -GPUCoalescer::IssueEvent::IssueEvent(GPUCoalescer* _seq) - : Event(Progress_Event_Pri), seq(_seq) -{ -} - void GPUCoalescer::completeIssue() @@ -1042,18 +1040,6 @@ GPUCoalescer::completeIssue() } void -GPUCoalescer::IssueEvent::process() -{ - seq->completeIssue(); -} - -const char * -GPUCoalescer::IssueEvent::description() const -{ - return "Issue coalesced request"; -} - -void GPUCoalescer::evictionCallback(Addr address) { ruby_eviction_callback(address); |