See PR43425: https://bugs.llvm.org/show_bug.cgi?id=43425 When writing profile data on Windows we were opening profile file with exclusive read/write access. In case we are trying to write to the file from multiple processes simultaneously, subsequent calls to CreateFileA would return INVALID_HANDLE_VALUE. To fix this, I changed to open without exclusive access and then take a lock. Patch by Michael Holman! Differential revision: https://reviews.llvm.org/D70330
11 lines
329 B
Plaintext
11 lines
329 B
Plaintext
RUN: %clang_profgen %S/Inputs/instrprof-multiprocess.c -o %t
|
|
RUN: rm -f %t_*.profraw
|
|
RUN: env LLVM_PROFILE_FILE=%t_%m.profraw %run %t
|
|
RUN: llvm-profdata show --counts -function=foo %t_*.profraw | FileCheck %s
|
|
|
|
CHECK: Counters:
|
|
CHECK: foo:
|
|
CHECK: Function count: 10
|
|
CHECK: Block counts: [5, 5]
|
|
CHECK: Functions shown: 1
|