diff options
author | Anna Zaks <ganna@apple.com> | 2012-03-22 21:06:03 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-03-22 21:06:03 +0000 |
commit | 749bbe6f5f23676244f12a0d41511c8e73516feb (patch) | |
tree | a5021944acd657b0597fa9e3ea7fe2c62f124fe7 /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 64394e2cc57d597eafe980bd94b060e2967a1cbd (diff) |
[analyzer] Add stats useful for coverage investigations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153280 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index a1be56426e..051c31a554 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -44,6 +44,12 @@ STATISTIC(NumRemoveDeadBindings, "The # of times RemoveDeadBindings is called"); STATISTIC(NumRemoveDeadBindingsSkipped, "The # of times RemoveDeadBindings is skipped"); +STATISTIC(NumMaxBlockCountReached, + "The # of aborted paths due to reaching the maximum block count in " + "a top level function"); +STATISTIC(NumMaxBlockCountReachedInInlined, + "The # of aborted paths due to reaching the maximum block count in " + "an inlined function"); //===----------------------------------------------------------------------===// // Utility functions. @@ -975,6 +981,14 @@ void ExprEngine::processCFGBlockEntrance(NodeBuilderWithSinks &nodeBuilder) { if (nodeBuilder.getContext().getCurrentBlockCount() >= AMgr.getMaxVisit()) { static SimpleProgramPointTag tag("ExprEngine : Block count exceeded"); nodeBuilder.generateNode(pred->getState(), pred, &tag, true); + + // Check if we stopped at the top level function or not. + // Root node should have the location context of the top most function. + if ((*G.roots_begin())->getLocation().getLocationContext() != + pred->getLocation().getLocationContext()) + NumMaxBlockCountReachedInInlined++; + else + NumMaxBlockCountReached++; } } |