[PATCH] D70330: [profile] Fix file contention causing dropped counts on Windows under -fprofile-generate

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 10:05:00 PST 2019


hans added inline comments.


================
Comment at: compiler-rt/test/profile/Windows/Inputs/instrprof-multiwrite.c:57
+int foo(int num) {
+  if (num < 5) {
+    return 1;
----------------
davidxl wrote:
> hans wrote:
> > I know dxf suggested adding some control-flow here, but I don't see why. Isn't just the function entry counts enough to verify that we've merged the profile info successfully? I'd suggest keeping it simple.
> Since it is a merging test, it is better IMO to  sanity test internal counts are merged properly as well with the simple control flow.
But it's not really the merging functionality that's being targeted by this fix and test, it's the ability to write to the same profraw file from multiple processes. The actual merging is supposedly covered by other tests.

But I don't feel very strongly, I just think it would be simpler and make the test more focused to leave this out.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70330/new/

https://reviews.llvm.org/D70330





More information about the llvm-commits mailing list