You've already forked linux-packaging-mono
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
INPUTS
bindings
cmake
docs
examples
include
lib
runtime
tools
unittests
utils
ABITest
CIndex
ClangVisualizers
TableGen
TestUtils
VtableTest
analyzer
CmpRuns.py
SATestAdd.py
SATestBuild.py
SATestUpdateDiffs.py
SATestUtils.py
SumTimerInfo.py
reducer.pl
ubiviz
update_plist_test.pl
check_cfc
perf-training
valgrind
CaptureCmd
ClangDataFormat.py
CmpDriver
FindSpecRefs
FuzzTest
bash-autocomplete.sh
builtin-defines.c
clangdiag.py
find-unused-diagnostics.sh
modfuzz.py
token-delta.py
www
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt
clang-tools-extra
compiler-rt
libcxx
libcxxabi
libunwind
lld
lldb
llvm
openmp
polly
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mk
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
80 lines
2.8 KiB
Python
80 lines
2.8 KiB
Python
#!/usr/bin/env python
|
|
|
|
"""
|
|
Script to Summarize statistics in the scan-build output.
|
|
|
|
Statistics are enabled by passing '-internal-stats' option to scan-build
|
|
(or '-analyzer-stats' to the analyzer).
|
|
"""
|
|
|
|
import sys
|
|
|
|
if __name__ == '__main__':
|
|
if len(sys.argv) < 2:
|
|
print >> sys.stderr, 'Usage: ', sys.argv[0],\
|
|
'scan_build_output_file'
|
|
sys.exit(-1)
|
|
|
|
f = open(sys.argv[1], 'r')
|
|
Time = 0.0
|
|
TotalTime = 0.0
|
|
MaxTime = 0.0
|
|
Warnings = 0
|
|
Count = 0
|
|
FunctionsAnalyzed = 0
|
|
ReachableBlocks = 0
|
|
ReachedMaxSteps = 0
|
|
NumSteps = 0
|
|
NumInlinedCallSites = 0
|
|
NumBifurcatedCallSites = 0
|
|
MaxCFGSize = 0
|
|
for line in f:
|
|
if ("Analyzer Total Time" in line):
|
|
s = line.split()
|
|
Time = Time + float(s[6])
|
|
Count = Count + 1
|
|
if (float(s[6]) > MaxTime):
|
|
MaxTime = float(s[6])
|
|
if ("warning generated." in line) or ("warnings generated" in line):
|
|
s = line.split()
|
|
Warnings = Warnings + int(s[0])
|
|
if "The # of functions analysed (as top level)" in line:
|
|
s = line.split()
|
|
FunctionsAnalyzed = FunctionsAnalyzed + int(s[0])
|
|
if "The % of reachable basic blocks" in line:
|
|
s = line.split()
|
|
ReachableBlocks = ReachableBlocks + int(s[0])
|
|
if "The # of times we reached the max number of steps" in line:
|
|
s = line.split()
|
|
ReachedMaxSteps = ReachedMaxSteps + int(s[0])
|
|
if "The maximum number of basic blocks in a function" in line:
|
|
s = line.split()
|
|
if MaxCFGSize < int(s[0]):
|
|
MaxCFGSize = int(s[0])
|
|
if "The # of steps executed" in line:
|
|
s = line.split()
|
|
NumSteps = NumSteps + int(s[0])
|
|
if "The # of times we inlined a call" in line:
|
|
s = line.split()
|
|
NumInlinedCallSites = NumInlinedCallSites + int(s[0])
|
|
if "The # of times we split the path due \
|
|
to imprecise dynamic dispatch info" in line:
|
|
s = line.split()
|
|
NumBifurcatedCallSites = NumBifurcatedCallSites + int(s[0])
|
|
if ") Total" in line:
|
|
s = line.split()
|
|
TotalTime = TotalTime + float(s[6])
|
|
|
|
print "TU Count %d" % (Count)
|
|
print "Time %f" % (Time)
|
|
print "Warnings %d" % (Warnings)
|
|
print "Functions Analyzed %d" % (FunctionsAnalyzed)
|
|
print "Reachable Blocks %d" % (ReachableBlocks)
|
|
print "Reached Max Steps %d" % (ReachedMaxSteps)
|
|
print "Number of Steps %d" % (NumSteps)
|
|
print "Number of Inlined calls %d (bifurcated %d)" % (
|
|
NumInlinedCallSites, NumBifurcatedCallSites)
|
|
print "MaxTime %f" % (MaxTime)
|
|
print "TotalTime %f" % (TotalTime)
|
|
print "Max CFG Size %d" % (MaxCFGSize)
|