[llvm] [memprof] Add computeUndriftMap (PR #116478)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 12:45:55 PST 2024
================
@@ -298,4 +304,189 @@ attributes #2 = { builtin allocsize(0) }
ASSERT_THAT(FooCallSites, SizeIs(1));
EXPECT_THAT(FooCallSites[0], Pair(FieldsAre(1U, 10U), 0));
}
+
+// Populate those fields returned by getHotColdSchema.
+MemInfoBlock makePartialMIB() {
+ MemInfoBlock MIB;
+ MIB.AllocCount = 1;
+ MIB.TotalSize = 5;
+ MIB.TotalLifetime = 10;
+ MIB.TotalLifetimeAccessDensity = 23;
+ return MIB;
+}
+
+IndexedMemProfRecord
+makeRecordV2(std::initializer_list<::llvm::memprof::CallStackId> AllocFrames,
+ std::initializer_list<::llvm::memprof::CallStackId> CallSiteFrames,
+ const MemInfoBlock &Block, const memprof::MemProfSchema &Schema) {
+ llvm::memprof::IndexedMemProfRecord MR;
+ for (const auto &CSId : AllocFrames)
----------------
kazutakahirata wrote:
Fixed in the latest iteration.
https://github.com/llvm/llvm-project/pull/116478
More information about the llvm-commits
mailing list