]> Cypherpunks repositories - gostls13.git/commit
runtime: use vDSO for clock_gettime on linux/arm
authorTobias Klauser <tklauser@distanz.ch>
Fri, 2 Mar 2018 10:27:15 +0000 (11:27 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Sat, 3 Mar 2018 12:12:58 +0000 (12:12 +0000)
commit51b027116c2c90e7cb938362b0134ff710fea54e
tree773d74d9a111aea28051bb7ef218675d44fce97e
parentc69f60d0715a836b739b34a92a56c1f7d29485a6
runtime: use vDSO for clock_gettime on linux/arm

Use the __vdso_clock_gettime fast path via the vDSO on linux/arm to
speed up nanotime and walltime. This results in the following
performance improvement for time.Now on a RaspberryPi 3 (running
32bit Raspbian, i.e. GOOS=linux/GOARCH=arm):

name     old time/op  new time/op  delta
TimeNow  0.99µs ± 0%  0.39µs ± 1%  -60.74%  (p=0.000 n=12+20)

Change-Id: I3598278a6c88d7f6a6ce66c56b9d25f9dd2f4c9a
Reviewed-on: https://go-review.googlesource.com/98095
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/runtime/os_linux.go
src/runtime/os_linux_noauxv.go
src/runtime/os_linux_novdso.go [new file with mode: 0644]
src/runtime/sys_linux_arm.s
src/runtime/vdso_elf32.go
src/runtime/vdso_linux.go
src/runtime/vdso_linux_arm.go [new file with mode: 0644]
src/runtime/vdso_linux_test.go