This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Optimized __cxa_guard_{acquire,release,abort} for Linux (take 2)
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Mon, 7 Jan 2008 10:25:47 -0600
- Subject: Re: [PATCH] Optimized __cxa_guard_{acquire,release,abort} for Linux (take 2)
- References: <20071231133948.GQ20451@devserv.devel.redhat.com> <20080104165012.7aff650f@wabash.artheist.org> <20080107121957.GB20451@devserv.devel.redhat.com>
> 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