about summary refs log tree commit diff homepage
path: root/lib/Core/Executor.h
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2019-07-30 18:45:42 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-10-29 15:38:02 -0400
commit4eb050e2999bef42f70dcc72a8ee283f8803ce67 (patch)
tree10b6bc4ade4040661142ae57f57639b402194152 /lib/Core/Executor.h
parentf2c9085cab7efd4468ffe44190547445fe5b15fb (diff)
downloadklee-4eb050e2999bef42f70dcc72a8ee283f8803ce67.tar.gz
ExecutorTimers: refactor and move to support lib
- moves timer handling from Executor into support lib
- introduces TimerGroup, removes TimerInfo/WriteStatsTimer/UpdateReachableTimer/WriteIStatsTimer classes
- removes ExecutorTimers.cpp and ExecutorTimerInfo.h
- removes -max-instruction-time flag (see #1114)
Diffstat (limited to 'lib/Core/Executor.h')
-rw-r--r--lib/Core/Executor.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/lib/Core/Executor.h b/lib/Core/Executor.h
index 84231720..f6e58a6b 100644
--- a/lib/Core/Executor.h
+++ b/lib/Core/Executor.h
@@ -92,15 +92,6 @@ class Executor : public Interpreter {
   friend class MergingSearcher;
 
 public:
-  class Timer {
-  public:
-    Timer() = default;
-    virtual ~Timer() = default;
-
-    /// The event callback.
-    virtual void run() = 0;
-  };
-
   typedef std::pair<ExecutionState*,ExecutionState*> StatePair;
 
   enum TerminateReason {
@@ -122,8 +113,6 @@ public:
 private:
   static const char *TerminateReasonNames[];
 
-  class TimerInfo;
-
   std::unique_ptr<KModule> kmodule;
   InterpreterHandler *interpreterHandler;
   Searcher *searcher;
@@ -135,7 +124,7 @@ private:
   StatsTracker *statsTracker;
   TreeStreamWriter *pathWriter, *symPathWriter;
   SpecialFunctionHandler *specialFunctionHandler;
-  std::vector<TimerInfo*> timers;
+  TimerGroup timers;
   std::unique_ptr<PTree> processTree;
 
   /// Keeps track of all currently ongoing merges.
@@ -460,14 +449,6 @@ private:
                                     ref<Expr> e,
                                     ref<ConstantExpr> value);
 
-  /// Add a timer to be executed periodically.
-  ///
-  /// \param timer The timer object to run on firings.
-  /// \param rate The approximate delay (in seconds) between firings.
-  void addTimer(Timer *timer, time::Span rate);
-
-  void initTimers();
-  void processTimers(ExecutionState *current, time::Span maxInstTime);
   void checkMemoryUsage();
   void printDebugInstructions(ExecutionState &state);
   void doDumpStates();