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

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 15:13:33 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
----------------
snehasish wrote:

Can you comment on why we need "-disable-llvm-optzns". It seems strange that it follows the O2 option.
Also is there a difference here for flto vs flto=thin?

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


More information about the llvm-commits mailing list