------- Comment #5 from seongbae dot park at gmail dot com 2006-07-23 17:27 ------- It seems that you didn't change libgcov.c, which suggests that you didn't address __gcov_{pow2,interval}_profiler. Without such change, -fprofile-generate will cause the mismatch between the value counters and edge counters, so it would be very nice if you can fix that as well (this is just a suggestion).
In case someone wants to address that issue, I think there are three choices: #1 make above profiler routines to use atomic increment *always* #2 introduce a new environment variable to pick atomic/non-atomic increment #3 make atomic increment version of those routines and -fprofile-multithread to generate codes to call them. I prefer #3, but #1 might be simple enough without much bad affect. Another comment is about the name of -fprofile-multithread. There's an alternative MT-safe profiling scheme of making counters TLS. So I'd prefer if the option for atomic increment is more explicit, something like -fprofile-atomic-increment. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28441