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: Failure to dlopen libgomp due to static TLS data


On Thu, Feb 12, 2015 at 05:11:45PM +0100, Jakub Jelinek wrote:
> On Thu, Feb 12, 2015 at 11:09:59AM -0500, Rich Felker wrote:
> > On Thu, Feb 12, 2015 at 04:18:57PM +0100, Ulrich Weigand wrote:
> > > Hello,
> > > 
> > > we're running into a problem related to use of initial-exec access to
> > > TLS variables in dynamically-loaded libraries.  Now, in general, this
> > > is actually not supported.  However, there seems to an "inofficial"
> > > extension that allows selected system libraries to use small amounts
> > > of static TLS space to allow critical variables to be defined to use
> > > the initial-exec model even in dynamically-loaded libraries.
> > 
> > This usage is supposed to be deprecated. Why isn't libgomp using
> > TLSDESC/gnu2 model?
> 
> Because it is significantly slower.

Seems very unlikely. If storage is allocated in static TLS, TLSDESC is
almost indistinguishable from IE in performance, even when you run
artificial benchmarks that do nothing but hammer TLS access. When it
gets allocated in dynamic TLS, it's somewhat slower, but still
unlikely to matter for most usage IMO. Do you have actual numbers
showing that TLSDESC is too slow for libgomp?

Rich


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