about summary refs log tree commit diff homepage
path: root/lib/Core/CoreStats.h
blob: 609e976a6a8ae2dbec6046d6eab70900895898f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//===-- CoreStats.h ---------------------------------------------*- C++ -*-===//
//
//                     The KLEE Symbolic Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef KLEE_CORESTATS_H
#define KLEE_CORESTATS_H

#include "klee/Core/BranchTypes.h"
#include "klee/Core/TerminationTypes.h"
#include "klee/Statistics/Statistic.h"

namespace klee {
namespace stats {

  extern Statistic allocations;
  extern Statistic resolveTime;
  extern Statistic instructions;
  extern Statistic instructionTime;
  extern Statistic instructionRealTime;
  extern Statistic coveredInstructions;
  extern Statistic uncoveredInstructions;  
  extern Statistic trueBranches;
  extern Statistic falseBranches;
  extern Statistic forkTime;
  extern Statistic solverTime;

  /// The number of external calls.
  extern Statistic externalCalls;

  /// The number of process forks.
  extern Statistic forks;

  /// Number of inhibited forks.
  extern Statistic inhibitedForks;

  /// Number of states, this is a "fake" statistic used by istats, it
  /// isn't normally up-to-date.
  extern Statistic states;

  /// Instruction level statistic tracking the minimum intraprocedural
  /// distance to an uncovered instruction; this is only periodically
  /// updated.
  extern Statistic minDistToUncovered;

  /// Instruction level statistic tracking the minimum intraprocedural
  /// distance to a function return.
  extern Statistic minDistToReturn;

  /// Count branch types in execution tree. Inhibited branches are ignored.
  #undef BTYPE
  #define BTYPE(Name,I) extern Statistic branches ## Name;
  BRANCH_TYPES

  /// Count termination types.
  #undef TCLASS
  #define TCLASS(Name,I) extern Statistic termination ## Name;
  TERMINATION_CLASSES

  /// Increase a branch statistic for the given reason by value.
  void incBranchStat(BranchType reason, std::uint32_t value);
}
}

#endif /* KLEE_CORESTATS_H */