about summary refs log tree commit diff homepage
path: root/tools/kleaver
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2013-01-02 14:33:58 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2013-01-02 14:33:58 +0000
commitc7db4230beef3b81542edb5d7ae6ca606d0567dd (patch)
treef3913e6ea23e0bffbbeff0fc8f5810159c1517f9 /tools/kleaver
parent26bf73bf80369a24467fcf1f53165824cbcd5679 (diff)
downloadklee-c7db4230beef3b81542edb5d7ae6ca606d0567dd.tar.gz
Patch by Tomasz Kuchta adding a new option (min-query-time-to-log) that enables KLEE to log only the queries exceeding a certain duration, or only those that time out.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@171385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/kleaver')
-rw-r--r--tools/kleaver/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp
index 077de3ed..16a0ea42 100644
--- a/tools/kleaver/main.cpp
+++ b/tools/kleaver/main.cpp
@@ -93,9 +93,20 @@ namespace {
   UseFastCexSolver("use-fast-cex-solver",
 		   cl::init(false));
   
+  // FIXME: Command line argument duplicated in Executor.cpp of Klee. Different
+  // output file name used.
   cl::opt<bool>
   UseSTPQueryPCLog("use-stp-query-pc-log",
                    cl::init(false));
+   
+  // FIXME: Command line argument duplicated in Executor.cpp of Klee
+  cl::opt<unsigned int>
+  MinQueryTimeToLog("min-query-time-to-log",
+                    cl::init(0),
+                    cl::value_desc("milliseconds"),
+                    cl::desc("Set time threshold (in ms) for queries logged in files. "
+                             "Only queries longer than threshold will be logged. (default=0)"));
+  
 }
 
 static std::string escapedString(const char *start, unsigned length) {
@@ -186,7 +197,7 @@ static bool EvaluateInputAST(const char *Filename,
   Solver *S, *STP = S = 
     UseDummySolver ? createDummySolver() : new STPSolver(true);
   if (UseSTPQueryPCLog)
-    S = createPCLoggingSolver(S, "stp-queries.pc");
+    S = createPCLoggingSolver(S, "stp-queries.pc", MinQueryTimeToLog);
   if (UseFastCexSolver)
     S = createFastCexSolver(S);
   S = createCexCachingSolver(S);