This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [PATCH] Optimized __cxa_guard_{acquire,release,abort} for Linux (take 2)


> 2008-01-07  Jakub Jelinek  <jakub@redhat.com>
> 
> libstdc++-v3/
> 	* configure.ac (--enable-linux-futex): Add new configure
> option. (HAVE_LINUX_FUTEX): New AC_DEFINE.
> 	* Makefile.in: Rebuilt.
> 	* aclocal.m4: Rebuilt.
> 	* configure: Rebuilt.
> 	* config.h.in: Rebuilt.
> 	* config/cpu/generic/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT,
> 	_GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT):
> Define.
> 	* config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_BIT,
> 	_GLIBCXX_GUARD_PENDING_BIT, _GLIBCXX_GUARD_WAITING_BIT):
> Define.
> 	* libsupc++/guard.cc: Include climits and syscall.h.
> 	(_GLIBCXX_USE_FUTEX): Define if futex syscall and atomic
> builtins are supported.
> 	(_GLIBCXX_FUTEX_WAIT, _GLIBCXX_FUTEX_WAKE): Likewise.
> 	(__guard_test_bit): New static inline.
> 	(__cxa_guard_acquire, __cxa_guard_release,
> __cxa_guard_abort): Use atomic builtins and futex syscall if
> _GLIBCXX_USE_FUTEX. config/
> 	* futex.m4: New file.
> libgomp/
> 	* configure.ac: Move futex checking into ../config/futex.m4.
> 	* configure: Rebuilt.
> 	* aclocal.m4: Rebuilt.
> 	* Makefile.in: Rebuilt.
> 
> 	* configure.tgt: Rename have_tls to gcc_cv_have_tls to match
> 	2007-10-15 ../config/tls.m4 change.

Great! This looks like what I was hoping for, config-wise. 

Certainly, the performance testing look promising with the futex path.
I'm glad to see this, as static locals are a very useful/important
language feature and improving QoI means more people will use them.

I think this is ok to check in on mainline, but suggest you wait 24 hrs
for Jason to sync up. (FWIW, I believe you have addressed his comments).

best,
benjamin


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