[compiler-rt] Fixed __llvm_profile_write_buffer in presence of ValueProfileData. (PR #97350)
Sunil Srivastava via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 10:57:21 PDT 2024
================
@@ -0,0 +1,47 @@
+// UNSUPPORTED: target={{.*windows.*}}
+// This test is derived from "compiler-rt/test/profile/instrprof-write-buffer-internal.c",
----------------
sks75220 wrote:
> On the other hand, without the non-test code changes I can see profile truncate error for this test case.
> Meanwhile let me know if you happen to have a theory already.
I don't have a theory. I admit that I don't fully understand the profraw format, or the concept of value-profile-data.
This bug started from a customer report who came across an invalid profraw generated by __llvm_profile_write_buffer() (rejected by llvm-profdata), whereas a similar use of __llvm_profile_write_file() worked fine.
So I have tried to mimic the functionality of __llvm_profile_write_file into __llvm_profile_write_buffer, but I have ended up adding dependencies that are best avoided.
https://github.com/llvm/llvm-project/pull/97350
More information about the llvm-commits
mailing list