mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: enable vDSO support for s390x architecture
This change adds support for vDSO for s390x architecture. This avoids the use of system calls in nanotime and walltime and accelerates them by factor 4-5.
Benchmarks:
100,000,000 x time.Now():
syscall fallback 13923ms 139.23 ns/op
vDSO enabled 2640ms 26.40 ns/op
Change-Id: Ic679fe31048379e59ccf83b400140f13c9d49696
GitHub-Last-Rev: 8f6e918a45
GitHub-Pull-Request: golang/go#49717
Reviewed-on: https://go-review.googlesource.com/c/go/+/365995
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Paul Murphy <murp@ibm.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Jonathan Albrecht <jonathan.albrecht@ibm.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
This commit is contained in:
parent
7b314d27ce
commit
636c5f0208
7 changed files with 198 additions and 22 deletions
|
|
@ -397,7 +397,7 @@ func preemptM(mp *m) {
|
|||
//go:nosplit
|
||||
func sigFetchG(c *sigctxt) *g {
|
||||
switch GOARCH {
|
||||
case "arm", "arm64", "ppc64", "ppc64le", "riscv64":
|
||||
case "arm", "arm64", "ppc64", "ppc64le", "riscv64", "s390x":
|
||||
if !iscgo && inVDSOPage(c.sigpc()) {
|
||||
// When using cgo, we save the g on TLS and load it from there
|
||||
// in sigtramp. Just use that.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue