[llvm] [memprof] Reduce schema for Version2 (PR #89876)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 09:23:46 PDT 2024


================
@@ -16,6 +16,9 @@ RUN: llvm-profdata show %t.prof.v1 | FileCheck %s
 RUN: llvm-profdata merge %t.proftext %p/Inputs/basic.memprofraw --memprof-version=2 --profiled-binary %p/Inputs/basic.memprofexe -o %t.prof.v2
 RUN: llvm-profdata show %t.prof.v2 | FileCheck %s
 
+RUN: llvm-profdata merge %t.proftext %p/Inputs/basic.memprofraw --memprof-version=2 --memprof-full-schema --profiled-binary %p/Inputs/basic.memprofexe -o %t.prof.v2
+RUN: llvm-profdata show %t.prof.v2 | FileCheck %s
----------------
kazutakahirata wrote:

> Is there any way to check the output to confirm that we either serialized 4 fields or all fields?

Yes, let me try to extend `llvm/unittests/ProfileData/InstrProfTest.cpp` to verify that the roundtrip works in each case -- the 4 fields or all fields.

> Also, just noticed that this test has "v0" in the name, should the name be changed to reflect the fact that it is testing all versions? (not in this PR but separately)

Yes, I just borrowed a test `memprof-merge.test` and added `-v0` to it.  I'll come up with a better name in a separate patch.

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


More information about the llvm-commits mailing list