diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2012-06-22 07:13:30 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2012-06-22 07:13:30 +0000 |
commit | 869fd80fd449c2e3f8d7caa7ff4af71e904b5f08 (patch) | |
tree | 58a73d4c3dd528ab72afbea3d6243d4dd6c48c3e /lib/libc/sys/Makefile.inc | |
parent | aea810386d8eb0602013a36a5d41822758972af6 (diff) | |
download | src-869fd80fd449c2e3f8d7caa7ff4af71e904b5f08.tar.gz src-869fd80fd449c2e3f8d7caa7ff4af71e904b5f08.zip |
Use struct vdso_timehands data to implement fast gettimeofday(2) and
clock_gettime(2) functions if supported. The speedup seen in
microbenchmarks is in range 4x-7x depending on the hardware.
Only amd64 and i386 architectures are supported. Libc uses rdtsc and
kernel data to calculate current time, if enabled by kernel.
Hopefully, this code is going to migrate into vdso in some future.
Discussed with: bde
Reviewed by: jhb
Tested by: flo
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=237434
Diffstat (limited to 'lib/libc/sys/Makefile.inc')
-rw-r--r-- | lib/libc/sys/Makefile.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 61d1713193e1..df4ef4279404 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -15,6 +15,10 @@ # .sinclude "${.CURDIR}/${LIBC_ARCH}/sys/Makefile.inc" +SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c +NOASM+= clock_gettime.o gettimeofday.o +PSEUDO+= _clock_gettime.o _gettimeofday.o + # Sources common to both syscall interfaces: SRCS+= stack_protector.c stack_protector_compat.c __error.c .if !defined(WITHOUT_SYSCALL_COMPAT) |