This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Thread-safety of a profiled binary (and GCOV runtime library)


On 07/25/16 08:28, Martin Liška wrote:

I'm also surprised about it :) Let's start without invention of a new flag, I'll work on that.

As using atomic add doesn't result in a change to the libgcov interface or structures, that's probably the best first approach. (It also probably gets the 90% case). thanks!


I like the idea sketched by Richard, utilizing TLS and merging counters, which fundamentally the same as merging with existing gcov file.
However, I would put this lower priority than the former problem.

Richard's suggestion is interesting, and as it solves both problems it may be worth a quick experiment? Perhaps the memory cost isn't so overwhelming? After all, it'd be roughly the same per-thread cost as the current gcov counters are for the single threaded app they're designed for.

nathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]