[Bug libstdc++/59177] steady_clock::now() and system_clock::now do not use the vdso (and are therefore very slow)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 18 19:25:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59177
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The default for --enable-libstdcxx-time is =auto, which should be the right
thing:
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
AC_MSG_CHECKING([for at least GNU libc 2.17])
AC_TRY_COMPILE(
[#include <features.h>],
[
#if ! __GLIBC_PREREQ(2, 17)
#error
#endif
],
[glibcxx_glibc217=yes], [glibcxx_glibc217=no])
AC_MSG_RESULT($glibcxx_glibc217)
if test x"$glibcxx_glibc217" = x"yes"; then
ac_has_clock_monotonic=yes
ac_has_clock_realtime=yes
fi
ac_has_nanosleep=yes
ac_has_sched_yield=yes
My trunk build on Fedora 19 today has:
/* Defined if clock_gettime syscall has monotonic and realtime clock support.
*/
/* #undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL */
/* Defined if clock_gettime has monotonic clock support. */
#define _GLIBCXX_USE_CLOCK_MONOTONIC 1
/* Defined if clock_gettime has realtime clock support. */
#define _GLIBCXX_USE_CLOCK_REALTIME 1
and there are two clock_gettime calls in libstdc++.so.6 as they should be.
More information about the Gcc-bugs
mailing list