[llvm] [MemProf] Tolerate missing leaf debug frames (PR #71233)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 16:40:35 PDT 2023


================
@@ -0,0 +1,92 @@
+;; Tests memprof profile matching when the leaf frame is missing in the
+;; profile. In this case the call to operator new was inlined before
+;; matching and we are able to match the next call frame up the inlined
+;; context.
+
+;; Avoid failures on big-endian systems that can't read the profile properly
+; REQUIRES: x86_64-linux
+
+;; TODO: Use text profile inputs once that is available for memprof.
+;; # To update the Inputs below, run Inputs/update_memprof_inputs.sh.
+;; # To generate below LLVM IR for use in matching:
+;; $ clang++ -gmlt -fdebug-info-for-profiling -S memprof_missing_leaf.cc \
+;; 	-O2 -mllvm -disable-llvm-optzns -flto
----------------
teresajohnson wrote:

I was using -flto just to get it to emit the LLVM assembly, but I switched to -emit-llvm instead. I thought I needed -mllvm -disable-llvm-optzns to prevent dead code elimination of my allocation, but I just tried without and don't need that, so I have cleaned that up

https://github.com/llvm/llvm-project/pull/71233


More information about the llvm-commits mailing list