aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2019-03-14 23:20:36 +0000
committerMartinNowack <martin.nowack@gmail.com>2019-03-15 10:31:59 +0000
commit5ce39ca2a370d469d42879669e02f1d66a869d3a (patch)
tree588babca72a85f098e2a8e1a8715b3275c62aa4f
parentd1a681f488857df373f5d340cd08e9d731bc8aa8 (diff)
downloadklee-5ce39ca2a370d469d42879669e02f1d66a869d3a.tar.gz
Created a new statistics option category
-rw-r--r--lib/Core/StatsTracker.cpp104
1 files changed, 56 insertions, 48 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index 0300d1ba..67553ad0 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -54,54 +54,62 @@ using namespace llvm;
///
-namespace {
- cl::opt<bool>
- TrackInstructionTime("track-instruction-time",
- cl::init(false),
- cl::desc("Enable tracking of time for individual instructions (default=false)"));
-
- cl::opt<bool>
- OutputStats("output-stats",
- cl::init(true),
- cl::desc("Write running stats trace file (default=true)"));
-
- cl::opt<bool>
- OutputIStats("output-istats",
- cl::init(true),
- cl::desc("Write instruction level statistics in callgrind format (default=true)"));
-
- cl::opt<std::string>
- StatsWriteInterval("stats-write-interval",
- cl::init("1s"),
- cl::desc("Approximate time between stats writes (default=1s)"));
-
- cl::opt<unsigned> StatsWriteAfterInstructions(
- "stats-write-after-instructions", cl::init(0),
- cl::desc("Write statistics after each n instructions, 0 to disable "
- "(default=0)"));
-
- cl::opt<std::string>
- IStatsWriteInterval("istats-write-interval",
- cl::init("10s"),
- cl::desc("Approximate number of seconds between istats writes (default=10s)"));
-
- cl::opt<unsigned> IStatsWriteAfterInstructions(
- "istats-write-after-instructions", cl::init(0),
- cl::desc("Write istats after each n instructions, 0 to disable "
- "(default=0)"));
-
- // XXX I really would like to have dynamic rate control for something like this.
- cl::opt<std::string>
- UncoveredUpdateInterval("uncovered-update-interval",
- cl::init("30s"),
- cl::desc("(default=30s)"));
-
- cl::opt<bool>
- UseCallPaths("use-call-paths",
- cl::init(true),
- cl::desc("Enable calltree tracking for instruction level statistics (default=true)"));
-
-}
+namespace {
+cl::OptionCategory
+ StatsCat("Statistics options",
+ "These options control the statistics generated by KLEE.");
+
+cl::opt<bool> TrackInstructionTime(
+ "track-instruction-time", cl::init(false),
+ cl::desc(
+ "Enable tracking of time for individual instructions (default=false)"),
+ cl::cat(StatsCat));
+
+cl::opt<bool>
+ OutputStats("output-stats", cl::init(true),
+ cl::desc("Write running stats trace file (default=true)"),
+ cl::cat(StatsCat));
+
+cl::opt<bool> OutputIStats("output-istats", cl::init(true),
+ cl::desc("Write instruction level statistics in "
+ "callgrind format (default=true)"),
+ cl::cat(StatsCat));
+
+cl::opt<std::string> StatsWriteInterval(
+ "stats-write-interval", cl::init("1s"),
+ cl::desc("Approximate time between stats writes (default=1s)"),
+ cl::cat(StatsCat));
+
+cl::opt<unsigned> StatsWriteAfterInstructions(
+ "stats-write-after-instructions", cl::init(0),
+ cl::desc(
+ "Write statistics after each n instructions, 0 to disable (default=0)"),
+ cl::cat(StatsCat));
+
+cl::opt<std::string> IStatsWriteInterval(
+ "istats-write-interval", cl::init("10s"),
+ cl::desc(
+ "Approximate number of seconds between istats writes (default=10s)"),
+ cl::cat(StatsCat));
+
+cl::opt<unsigned> IStatsWriteAfterInstructions(
+ "istats-write-after-instructions", cl::init(0),
+ cl::desc(
+ "Write istats after each n instructions, 0 to disable (default=0)"),
+ cl::cat(StatsCat));
+
+// XXX I really would like to have dynamic rate control for something like this.
+cl::opt<std::string> UncoveredUpdateInterval(
+ "uncovered-update-interval", cl::init("30s"),
+ cl::desc("Update interval for uncovered instructions (default=30s)"),
+ cl::cat(StatsCat));
+
+cl::opt<bool> UseCallPaths("use-call-paths", cl::init(true),
+ cl::desc("Enable calltree tracking for instruction "
+ "level statistics (default=true)"),
+ cl::cat(StatsCat));
+
+} // namespace
///