This is the mail archive of the gcc-patches@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-safe profiling



On Mar 14, 2007, at 2:30 PM, Jan Hubicka wrote:


Hi,

On the course of implementing this I hit some bugs in the expansion code
of these builtins and the i386 backend, which are also fixed by this
patch.

This would be probably worth backporting separately to release branch(es).


I agree. I'd like to see it at least to 4.2, probably 4.1 for the various linux distros. :)



The patch seems OK overall, but I don't see any handling of targets that
don't support synchronization primitives. I think at least
-fthread-safe-profiling option should give a sorry here and we should be
able to build libgcov so probably we need to ifdef the thread safe
variants out somehow if building on such targets leads to
sorry/ICE/whatever evil it should lead to.



Probably.


Also I think the call profiling won't work, since it uses a global
variable to figure out from where the function was called.  I think we
probably need a thread local storage here, that should not be that bad
(it is one variable per compilation unit).

With the emutls stuff it should be able to work even on targets without TLS at least.

-eric


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