aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/vdso_in_none.go
AgeCommit message (Collapse)Author
2021-02-20all: go fmt std cmd (but revert vendor)Russ Cox
Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: Ia0534360e4957e58cd9a18429c39d0e32a6addb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/294430 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-11-04runtime: use vDSO clock_gettime on linux/mips64xWang Xuerui
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>
2018-08-31runtime: add support for VDSO on ppc64x for use in walltime/nanotimeCarlos Eduardo Seo
This change adds support for VDSO on ppc64x, making it possible to avoid a syscall in walltime and nanotime. BenchmarkClockVDSOAndFallbackPaths/vDSO-192 20000000 66.0 ns/op BenchmarkClockVDSOAndFallbackPaths/Fallback-192 1000000 1456 ns/op Change-Id: I3373bd804b6f122961de3ae9d034e6ccf35748e6 Reviewed-on: https://go-review.googlesource.com/131135 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
2018-03-27runtime: use vDSO for clock_gettime on linux/arm64Meng Zhuo
Use the __vdso_clock_gettime fast path via the vDSO on linux/arm64 to speed up nanotime and walltime. This results in the following performance improvement for time.Now on Cavium ThunderX: name old time/op new time/op delta TimeNow 442ns ± 0% 163ns ± 0% -63.16% (p=0.000 n=10+10) And benchmarks on VDSO BenchmarkClockVDSOAndFallbackPaths/vDSO 10000000 166 ns/op BenchmarkClockVDSOAndFallbackPaths/Fallback 3000000 456 ns/op Change-Id: I326118c6dff865eaa0569fc45d1fc1ff95cb74f6 Reviewed-on: https://go-review.googlesource.com/99855 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-07runtime: get traceback from VDSO codeIan Lance Taylor
Currently if a profiling signal arrives while executing within a VDSO the profiler will report _ExternalCode, which is needlessly confusing for a pure Go program. Change the VDSO calling code to record the caller's PC/SP, so that we can do a traceback from that point. If that fails for some reason, report _VDSO rather than _ExternalCode, which should at least point in the right direction. This adds some instructions to the code that calls the VDSO, but the slowdown is reasonably negligible: name old time/op new time/op delta ClockVDSOAndFallbackPaths/vDSO-8 40.5ns ± 2% 41.3ns ± 1% +1.85% (p=0.002 n=10+10) ClockVDSOAndFallbackPaths/Fallback-8 41.9ns ± 1% 43.5ns ± 1% +3.84% (p=0.000 n=9+9) TimeNow-8 41.5ns ± 3% 41.5ns ± 2% ~ (p=0.723 n=10+10) Fixes #24142 Change-Id: Iacd935db3c4c782150b3809aaa675a71799b1c9c Reviewed-on: https://go-review.googlesource.com/97315 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>