]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: use vDSO clock_gettime on linux/riscv64
authorMeng Zhuo <mzh@golangcn.org>
Thu, 26 Aug 2021 01:32:38 +0000 (09:32 +0800)
committerMeng Zhuo <mzh@golangcn.org>
Thu, 2 Sep 2021 01:23:38 +0000 (01:23 +0000)
commit1bd35fab05252450c3f67df18f9976fdaaa4dcf4
treec6f9f0fcd13200db2ab2e8f1691f02b1fe3903fd
parentdf4c625d88859003df65bc5d528942ee6ba793a1
runtime: use vDSO clock_gettime on linux/riscv64

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

name          old time/op  new time/op  delta
Now           1.53µs ± 1%  1.05µs ± 3%  -31.74%  (p=0.000 n=10+10)
NowUnixNano   1.54µs ± 0%  1.05µs ± 2%  -31.91%  (p=0.000 n=9+10)
NowUnixMilli  1.56µs ± 1%  1.06µs ± 1%  -31.73%  (p=0.000 n=10+10)
NowUnixMicro  1.56µs ± 1%  1.05µs ± 1%  -32.80%  (p=0.000 n=9+10)

Change-Id: I69b3fe3cc57685a826c53b366c0992e8048399bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/328509
Trust: Meng Zhuo <mzh@golangcn.org>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/os_linux_novdso.go
src/runtime/signal_unix.go
src/runtime/sys_linux_riscv64.s
src/runtime/vdso_elf64.go
src/runtime/vdso_in_none.go
src/runtime/vdso_linux.go
src/runtime/vdso_linux_riscv64.go [new file with mode: 0644]