aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/export_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-07-19 11:01:17 -0400
committerRuss Cox <rsc@golang.org>2011-07-19 11:01:17 -0400
commit025abd530e2c5a010b295efbcbcef94aff0cd396 (patch)
treeaae8236f32731d731ea8dac9687c9761147e95d0 /src/pkg/runtime/export_test.go
parent9f636598ba2425cbc31e416599f430829fa36b20 (diff)
downloadgo-025abd530e2c5a010b295efbcbcef94aff0cd396.tar.xz
runtime: faster entersyscall, exitsyscall
Uses atomic memory accesses to avoid the need to acquire and release schedlock on fast paths. benchmark old ns/op new ns/op delta runtime_test.BenchmarkSyscall 73 31 -56.63% runtime_test.BenchmarkSyscall-2 538 74 -86.23% runtime_test.BenchmarkSyscall-3 508 103 -79.72% runtime_test.BenchmarkSyscall-4 721 97 -86.52% runtime_test.BenchmarkSyscallWork 920 873 -5.11% runtime_test.BenchmarkSyscallWork-2 516 481 -6.78% runtime_test.BenchmarkSyscallWork-3 550 343 -37.64% runtime_test.BenchmarkSyscallWork-4 632 263 -58.39% (Intel Core i7 L640 2.13 GHz-based Lenovo X201s) Reduced a less artificial server benchmark from 11.5r 12.0u 8.0s to 8.3r 9.1u 1.0s. R=dvyukov, r, bradfitz, r, iant, iant CC=golang-dev https://golang.org/cl/4723042
Diffstat (limited to 'src/pkg/runtime/export_test.go')
-rw-r--r--src/pkg/runtime/export_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/runtime/export_test.go b/src/pkg/runtime/export_test.go
index 58631c7b4b..53c5fcba47 100644
--- a/src/pkg/runtime/export_test.go
+++ b/src/pkg/runtime/export_test.go
@@ -15,3 +15,9 @@ var F32to64 = f32to64
var Fcmp64 = fcmp64
var Fintto64 = fintto64
var F64toint = f64toint
+
+func entersyscall()
+func exitsyscall()
+
+var Entersyscall = entersyscall
+var Exitsyscall = exitsyscall