]> Cypherpunks repositories - gostls13.git/commit
runtime: use vDSO clock_gettime on linux/mips64x
authorWang Xuerui <git@xen0n.name>
Mon, 4 Nov 2019 13:29:20 +0000 (13:29 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 4 Nov 2019 18:53:43 +0000 (18:53 +0000)
commit210e3677f997fcce48e749437853203358f1b7b4
tree0a36c2bd7c03f557a99e2dfc54f48b970bf63ffb
parentbf7e55b618ff4ec8e823b77c3c775d0fb4dba1ba
runtime: use vDSO clock_gettime on linux/mips64x

Speed up nanotime1 and walltime1 on MIPS64 with vDSO, just like the
other vDSO-enabled targets.

Benchmark numbers on Loongson 3A3000 (GOARCH=mips64le, 1.4GHz) against
current master:

benchmark                old ns/op     new ns/op     delta
BenchmarkNow             868           293           -66.24%
BenchmarkNowUnixNano     851           296           -65.22%

Performance hit on fallback case, tested by using a wrong vDSO symbol name:

benchmark                old ns/op     new ns/op     delta
BenchmarkNow             868           889           +2.42%
BenchmarkNowUnixNano     851           893           +4.94%

Change-Id: Ibfb48893cd060536359863ffee7624c00def646b
GitHub-Last-Rev: 03a58ac2e4e036a4f61227cfd013082871e92863
GitHub-Pull-Request: golang/go#35181
Reviewed-on: https://go-review.googlesource.com/c/go/+/203578
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/runtime/os_linux_novdso.go
src/runtime/sys_linux_mips64x.s
src/runtime/vdso_elf64.go
src/runtime/vdso_in_none.go
src/runtime/vdso_linux.go
src/runtime/vdso_linux_mips64x.go [new file with mode: 0644]