summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2014-11-21 21:25:18 +0000
committerKostya Serebryany <kcc@google.com>2014-11-21 21:25:18 +0000
commitea2cb6f6166b94ed1ed6cfc62159d982944078ee (patch)
treea6697ab7233d3525d12a935e54e001d5801c6bca
parente47130e407883f17af82bba9889c56453f537856 (diff)
downloadbcm5719-llvm-ea2cb6f6166b94ed1ed6cfc62159d982944078ee.tar.gz
bcm5719-llvm-ea2cb6f6166b94ed1ed6cfc62159d982944078ee.zip
[asan] add statistic counter to dynamic alloca instrumentation
llvm-svn: 222573
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index e095ed5f033..414fb65d663 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -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++;
}
OpenPOWER on IntegriCloud