[PATCH] Set -fprofile-update=atomic when -pthread is present

Andi Kleen andi@firstfloor.org
Mon Oct 3 17:52:00 GMT 2016


> >>I would to somehow resolve the discussion related to default value
> >>selection.
> >>Is the prevailing consensus that we should set -fprofile-update=atomic
> >>when
> >>-pthread is set? If so, I'll prepare a patch. I tend to do it this way.
> >
> >This is my preference.
> Likewise.

I still think it shouldn't be default even with -pthread because it could dramatically
degrade performance in these cases. People likely have -pthread in their Makefiles
without realizing it. Such changes should be explict opt-in.

Often severe performance decreases lead to incorrectness in practice
("is now too slow to finish training workload in rebuild cycle") 

-Andi



More information about the Gcc-patches mailing list