From: Kostya Serebryany Date: Fri, 21 Nov 2014 21:25:18 +0000 (+0000) Subject: [asan] add statistic counter to dynamic alloca instrumentation X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=598c08cf1cdf1e7eb9fedba242de403704d232a4;p=oota-llvm.git [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 --- diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index e095ed5f033..414fb65d663 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -209,6 +209,8 @@ static cl::opt 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++; }