is it safe to generate profiles from multiple concurrent processes?

Vincenzo Innocente vincenzo.innocente@gmail.com
Wed Jun 25 12:40:00 GMT 2014


I have built a library with -fprofile-generate. 
Now I want to generate profiles using various applications that link that library.

My understanding is that it is safe to run a multi-thread process to populate the profiles.
It is unclear to me if one can safely run multiple processes concurrently.

is there any risk of corruption or overwriting of the various "gcda” files if different processes attempt to write on them?
If safe I can easily speed up the generation of profiles by orders of magnitude.

 thanks,
     vincenzo




More information about the Gcc-help mailing list