For example, consider a simple program: int main() { unsigned x = 1; for (int i = 0; i < 100*1000*1000; i++) { x *= i; } return 0; } built with instrumentation: clang-cl -fprofile-generate=\src\tmp\ \src\tmp\a.cc and run in an bunch of concurrent invocations (using e.g. Cygwin): $ for i in `seq 1 100` ; do ./a.exe & done A bunch of the program invocations fail to write their profile: LLVM Profile Error: Failed to write file "\src\tmp\default_15822669652030248442_0.profraw": File exists LLVM Profile Error: Failed to write file "\src\tmp\default_15822669652030248442_0.profraw": File exists LLVM Profile Error: Failed to write file "\src\tmp\default_15822669652030248442_0.profraw": File exists (This shows up when running instrumented tablegen binaries as part of building IR-instrumented Clang on Windows, see e.g. https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8901886476057032176/+/steps/package_clang/0/stdout)
Bug seems to be present in 7.1.0/8.0.1 as well.
Yes, it probably never worked. I have this on my tood list but I'm not sure when I'll get to it, so if someone else wants to take a look, please feel free :-)
> I have this on my tood list *todo list
Should be fixed by Michael's https://reviews.llvm.org/D70330