[llvm] r222573 - [asan] add statistic counter to dynamic alloca instrumentation

Kostya Serebryany kcc at google.com
Fri Nov 21 13:25:18 PST 2014


Author: kcc
Date: Fri Nov 21 15:25:18 2014
New Revision: 222573

URL: http://llvm.org/viewvc/llvm-project?rev=222573&view=rev
Log:
[asan] add statistic counter to dynamic alloca instrumentation

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=222573&r1=222572&r2=222573&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Nov 21 15:25:18 2014
@@ -209,6 +209,8 @@ static cl::opt<int> ClDebugMax("asan-deb
 
 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::handleDynami
   // We are done. Erase old alloca and store left, partial and right redzones
   // shadow addresses for future unpoisoning.
   AI->eraseFromParent();
+  NumInstrumentedDynamicAllocas++;
 }





More information about the llvm-commits mailing list