summaryrefslogtreecommitdiff
path: root/src/mem/ruby/profiler/Profiler.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-08-27 01:00:55 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-08-27 01:00:55 -0500
commit9190940511b5783811bc6288dd4f22f8d18c9d26 (patch)
tree72a07f80a772d7c6f2a6f0255cee173ac631cb35 /src/mem/ruby/profiler/Profiler.hh
parent7122b83d8f92d77bccae432b4e90ba12f1babad5 (diff)
downloadgem5-9190940511b5783811bc6288dd4f22f8d18c9d26.tar.xz
Ruby: Remove RubyEventQueue
This patch removes RubyEventQueue. Consumer objects now rely on RubySystem or themselves for scheduling events.
Diffstat (limited to 'src/mem/ruby/profiler/Profiler.hh')
-rw-r--r--src/mem/ruby/profiler/Profiler.hh19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mem/ruby/profiler/Profiler.hh b/src/mem/ruby/profiler/Profiler.hh
index 7945b6c73..58043dfaf 100644
--- a/src/mem/ruby/profiler/Profiler.hh
+++ b/src/mem/ruby/profiler/Profiler.hh
@@ -58,7 +58,6 @@
#include "mem/protocol/RubyAccessMode.hh"
#include "mem/protocol/RubyRequestType.hh"
#include "mem/ruby/common/Address.hh"
-#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/common/Histogram.hh"
#include "mem/ruby/common/Set.hh"
@@ -70,7 +69,7 @@
class RubyRequest;
class AddressProfiler;
-class Profiler : public SimObject, public Consumer
+class Profiler : public SimObject
{
public:
typedef RubyProfilerParams Params;
@@ -244,6 +243,20 @@ class Profiler : public SimObject, public Consumer
bool m_all_instructions;
int m_num_of_sequencers;
+
+ protected:
+ class ProfileEvent : public Event
+ {
+ public:
+ ProfileEvent(Profiler *_profiler)
+ {
+ profiler = _profiler;
+ }
+ private:
+ void process() { profiler->wakeup(); }
+ Profiler *profiler;
+ };
+ ProfileEvent m_event;
};
inline std::ostream&
@@ -255,5 +268,3 @@ operator<<(std::ostream& out, const Profiler& obj)
}
#endif // __MEM_RUBY_PROFILER_PROFILER_HH__
-
-