[PATCH] D84358: Temporarily revert D83903 "[PGO] Enable the extended value profile buckets for mem op sizes."

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 13:03:27 PDT 2020


MaskRay created this revision.
MaskRay added reviewers: davidxl, yamauchi.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

__llvm_profile_instrument_memop transitively calls calloc, thus calloc
should not be instrumented.

I saw a
calloc -> __llvm_profile_instrument_memop -> calloc -> __llvm_profile_instrument_memop -> ...
infinite loop leading to stack overflow
when the malloc implementation (e.g. tcmalloc) is built and instrumented along with the application.

We should figure out the library calls which may be instrumented and disable
their instrumentation before rolling out this change.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84358

Files:
  llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp


Index: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -78,7 +78,7 @@
     "use-old-memop-value-prof",
     cl::desc("Use the old memop value profiling buckets. This is "
              "transitional and to be removed after switching. "),
-    cl::init(false));
+    cl::init(true));
 
 namespace {
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84358.279924.patch
Type: text/x-patch
Size: 496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200722/988b89d5/attachment.bin>


More information about the llvm-commits mailing list