[PATCH] D70910: [compiler-rt] Add a critical section when flushing gcov counters
calixte via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 04:16:07 PST 2020
calixte added a comment.
> OK that helps a bit. I still don't understand though: why do you only need to protect flush and nothing else? You're protecting specific variables from being accesses concurrently only though flush, and not through the other paths that access those variables. Are these variables never accessed concurrently from these other functions?
As far as I know, the functions using global variables are called from `__gcov_flush` and from functions ran `atexit`, so the only way for these global variables to be used asynchronously is when `__gcov_flush` is called from different threads.
@jfb if you see other possible paths, please tell me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70910/new/
https://reviews.llvm.org/D70910
More information about the llvm-commits
mailing list