[asan] add statistic counter to dynamic alloca instrumentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany
2014-11-21 21:25:18 +00:00
parent a3b0670792
commit 598c08cf1c

View File

@@ -209,6 +209,8 @@ static cl::opt<int> ClDebugMax("asan-debug-max", cl::desc("Debug man inst"),
STATISTIC(NumInstrumentedReads, "Number of instrumented reads");
STATISTIC(NumInstrumentedWrites, "Number of instrumented writes");
STATISTIC(NumInstrumentedDynamicAllocas,
"Number of instrumented dynamic allocas");
STATISTIC(NumOptimizedAccessesToGlobalArray,
"Number of optimized accesses to global arrays");
STATISTIC(NumOptimizedAccessesToGlobalVar,
@@ -1942,4 +1944,5 @@ void FunctionStackPoisoner::handleDynamicAllocaCall(
// We are done. Erase old alloca and store left, partial and right redzones
// shadow addresses for future unpoisoning.
AI->eraseFromParent();
NumInstrumentedDynamicAllocas++;
}