[llvm] [memprof] Undrift MemProf profile even when some frames are missing (PR #120500)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 14:25:48 PST 2024
================
@@ -0,0 +1,97 @@
+;; Tests memprof undrifting when the leaf frame is missing in the profile.
+;; This test case is taken from memprof_missing_leaf.ll with the profile
+;; drifted.
+
+;; Avoid failures on big-endian systems that can't read the profile properly
+; REQUIRES: x86_64-linux
+
+; RUN: split-file %s %t
+; RUN: llvm-profdata merge %t/memprof_missing_leaf.yaml -o %t/memprof_missing_leaf.memprofdata
+; RUN: opt < %t/memprof_missing_leaf.ll -passes='memprof-use<profile-filename=%t/memprof_missing_leaf.memprofdata>' -memprof-salvage-stale-profile -S | FileCheck %s
+
+;--- memprof_missing_leaf.yaml
+---
+HeapProfileRecords:
+ - GUID: main
+ AllocSites:
+ - Callstack:
+ - { Function: main, LineOffset: 2, Column: 21, IsInlineFrame: false }
+ MemInfoBlock:
+ AllocCount: 1
+ TotalSize: 1
+ TotalLifetime: 0
+ TotalLifetimeAccessDensity: 0
----------------
kazutakahirata wrote:
Removed.
https://github.com/llvm/llvm-project/pull/120500
More information about the llvm-commits
mailing list