summaryrefslogtreecommitdiff
path: root/src/gpu-compute/tlb_coalescer.hh
diff options
context:
space:
mode:
authorSean Wilson <spwilson2@wisc.edu>2017-06-27 14:18:10 -0500
committerSean Wilson <spwilson2@wisc.edu>2017-07-12 20:07:05 +0000
commit741261f10bb308cdc200c5dfd8eb68567349cf19 (patch)
treeb44581cb4b93d64c079a80ab9e510205ffe93d0a /src/gpu-compute/tlb_coalescer.hh
parent55f70760de9cf9d16905372d885b7925722721a8 (diff)
downloadgem5-741261f10bb308cdc200c5dfd8eb68567349cf19.tar.xz
gpu-compute: Refactor some Event subclasses to lambdas
Change-Id: Ic1332b8e8ba0afacbe591c80f4d06afbf5f04bd9 Signed-off-by: Sean Wilson <spwilson2@wisc.edu> Reviewed-on: https://gem5-review.googlesource.com/3922 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src/gpu-compute/tlb_coalescer.hh')
-rw-r--r--src/gpu-compute/tlb_coalescer.hh37
1 files changed, 8 insertions, 29 deletions
diff --git a/src/gpu-compute/tlb_coalescer.hh b/src/gpu-compute/tlb_coalescer.hh
index 09210148b..b03e77150 100644
--- a/src/gpu-compute/tlb_coalescer.hh
+++ b/src/gpu-compute/tlb_coalescer.hh
@@ -214,35 +214,14 @@ class TLBCoalescer : public MemObject
BaseMasterPort& getMasterPort(const std::string &if_name, PortID idx);
BaseSlavePort& getSlavePort(const std::string &if_name, PortID idx);
- class IssueProbeEvent : public Event
- {
- private:
- TLBCoalescer *coalescer;
-
- public:
- IssueProbeEvent(TLBCoalescer *_coalescer);
- void process();
- const char *description() const;
- };
-
- // this event issues the TLB probes
- IssueProbeEvent probeTLBEvent;
-
- // the cleanupEvent is scheduled after a TLBEvent triggers
- // in order to free memory and do the required clean-up
- class CleanupEvent : public Event
- {
- private:
- TLBCoalescer *coalescer;
-
- public:
- CleanupEvent(TLBCoalescer *_coalescer);
- void process();
- const char* description() const;
- };
-
- // schedule cleanup
- CleanupEvent cleanupEvent;
+ void processProbeTLBEvent();
+ /// This event issues the TLB probes
+ EventFunctionWrapper probeTLBEvent;
+
+ void processCleanupEvent();
+ /// The cleanupEvent is scheduled after a TLBEvent triggers
+ /// in order to free memory and do the required clean-up
+ EventFunctionWrapper cleanupEvent;
// this FIFO queue keeps track of the virt. page
// addresses that are pending cleanup