From 4eb050e2999bef42f70dcc72a8ee283f8803ce67 Mon Sep 17 00:00:00 2001 From: Frank Busse Date: Tue, 30 Jul 2019 18:45:42 +0100 Subject: 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) --- lib/Core/Executor.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'lib/Core/Executor.h') 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 StatePair; enum TerminateReason { @@ -122,8 +113,6 @@ public: private: static const char *TerminateReasonNames[]; - class TimerInfo; - std::unique_ptr kmodule; InterpreterHandler *interpreterHandler; Searcher *searcher; @@ -135,7 +124,7 @@ private: StatsTracker *statsTracker; TreeStreamWriter *pathWriter, *symPathWriter; SpecialFunctionHandler *specialFunctionHandler; - std::vector timers; + TimerGroup timers; std::unique_ptr processTree; /// Keeps track of all currently ongoing merges. @@ -460,14 +449,6 @@ private: ref e, ref 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(); -- cgit 1.4.1