[go: up one dir, main page]

Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(664)

Issue 107030044: all: remove 'extern register M *m' from runtime

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by rsc
Modified:
11 years, 7 months ago
Reviewers:
Visibility:
Public.

Description

all: remove 'extern register M *m' from runtime The runtime has historically held two dedicated values g (current goroutine) and m (current thread) in 'extern register' slots (TLS on x86, real registers backed by TLS on ARM). This CL removes the extern register m; code now uses g->m. On ARM, this frees up the register that formerly held m (R9). This is important for NaCl, because NaCl ARM code cannot use R9 at all. The Go 1 macrobenchmarks (those with per-op times >= 10 µs) are unaffected: BenchmarkBinaryTree17 5491374955 5471024381 -0.37% BenchmarkFannkuch11 4357101311 4275174828 -1.88% BenchmarkGobDecode 11029957 11364184 +3.03% BenchmarkGobEncode 6852205 6784822 -0.98% BenchmarkGzip 650795967 650152275 -0.10% BenchmarkGunzip 140962363 141041670 +0.06% BenchmarkHTTPClientServer 71581 73081 +2.10% BenchmarkJSONEncode 31928079 31913356 -0.05% BenchmarkJSONDecode 117470065 113689916 -3.22% BenchmarkMandelbrot200 6008923 5998712 -0.17% BenchmarkGoParse 6310917 6327487 +0.26% BenchmarkRegexpMatchMedium_1K 114568 114763 +0.17% BenchmarkRegexpMatchHard_1K 168977 169244 +0.16% BenchmarkRevcomp 935294971 914060918 -2.27% BenchmarkTemplate 145917123 148186096 +1.55% Minux previous reported larger variations, but these were caused by run-to-run noise, not repeatable slowdowns. Actual code changes by Minux. I only did the docs and the benchmarking. TODO: - remove TLS slot from linkers and runtime/cgo - check runtime for comments about m

Patch Set 1 #

Patch Set 2 : diff -r 30307cc8bef2 https://go.googlecode.com/hg #

Patch Set 3 : diff -r 30307cc8bef2 https://go.googlecode.com/hg #

Patch Set 4 : diff -r 7d2e78c502ab https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+964 lines, -925 lines) Patch
M doc/asm.html View 1 2 4 chunks +12 lines, -12 lines 0 comments Download
M include/link.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/5a/lex.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/cmd/dist/buildruntime.c View 1 1 chunk +0 lines, -3 lines 0 comments Download
M src/cmd/ld/data.c View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M src/cmd/ld/lib.c View 1 2 2 chunks +7 lines, -7 lines 0 comments Download
M src/cmd/ld/symtab.c View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/liblink/asm5.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/liblink/obj5.c View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M src/liblink/obj6.c View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/asm_386.s View 1 2 11 chunks +34 lines, -28 lines 0 comments Download
M src/pkg/runtime/asm_amd64.s View 1 2 15 chunks +43 lines, -29 lines 0 comments Download
M src/pkg/runtime/asm_amd64p32.s View 1 9 chunks +18 lines, -9 lines 0 comments Download
M src/pkg/runtime/asm_arm.s View 1 2 3 15 chunks +62 lines, -53 lines 0 comments Download
M src/pkg/runtime/cgo/asm_arm.s View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/cgo/callbacks.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_arm.S View 1 2 1 chunk +4 lines, -5 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_darwin_386.c View 1 2 3 4 chunks +23 lines, -34 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_darwin_amd64.c View 1 2 3 3 chunks +15 lines, -24 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_dragonfly_386.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_dragonfly_amd64.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_freebsd_386.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_freebsd_amd64.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_freebsd_arm.c View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_linux_386.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_linux_amd64.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_linux_arm.c View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_netbsd_386.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_netbsd_amd64.c View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_netbsd_arm.c View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_openbsd_386.c View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_openbsd_amd64.c View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_windows_386.c View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M src/pkg/runtime/cgo/gcc_windows_amd64.c View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M src/pkg/runtime/cgo/libcgo.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/cgocall.c View 1 8 chunks +13 lines, -13 lines 0 comments Download
M src/pkg/runtime/heapdump.c View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/lock_futex.c View 1 7 chunks +12 lines, -12 lines 0 comments Download
M src/pkg/runtime/lock_sema.c View 1 9 chunks +28 lines, -28 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 10 chunks +19 lines, -19 lines 0 comments Download
M src/pkg/runtime/mcache.c View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 20 chunks +34 lines, -34 lines 0 comments Download
M src/pkg/runtime/mheap.c View 1 7 chunks +10 lines, -10 lines 0 comments Download
M src/pkg/runtime/mprof.goc View 1 7 chunks +13 lines, -13 lines 0 comments Download
M src/pkg/runtime/netpoll_solaris.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/netpoll_windows.c View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/runtime/os_darwin.c View 1 4 chunks +6 lines, -5 lines 0 comments Download
M src/pkg/runtime/os_dragonfly.c View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/runtime/os_freebsd.c View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/runtime/os_linux.c View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/runtime/os_nacl.c View 1 8 chunks +15 lines, -14 lines 0 comments Download
M src/pkg/runtime/os_netbsd.c View 1 6 chunks +14 lines, -13 lines 0 comments Download
M src/pkg/runtime/os_openbsd.c View 1 4 chunks +11 lines, -10 lines 0 comments Download
M src/pkg/runtime/os_plan9.c View 1 5 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/runtime/os_plan9_386.c View 1 3 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/os_plan9_amd64.c View 1 3 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/os_solaris.c View 1 5 chunks +19 lines, -15 lines 0 comments Download
M src/pkg/runtime/os_windows.c View 1 4 chunks +13 lines, -13 lines 0 comments Download
M src/pkg/runtime/os_windows_386.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/os_windows_amd64.c View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/panic.c View 1 9 chunks +27 lines, -27 lines 0 comments Download
M src/pkg/runtime/proc.c View 1 2 67 chunks +166 lines, -166 lines 0 comments Download
M src/pkg/runtime/race_amd64.s View 1 2 chunks +5 lines, -3 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M src/pkg/runtime/runtime.c View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/runtime1.goc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/signal_386.c View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/runtime/signal_amd64x.c View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/signal_arm.c View 1 4 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/runtime/signal_unix.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/softfloat_arm.c View 1 3 chunks +7 lines, -5 lines 0 comments Download
M src/pkg/runtime/stack.c View 1 2 3 13 chunks +47 lines, -47 lines 0 comments Download
M src/pkg/runtime/symtab.goc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/sys_darwin_386.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_darwin_amd64.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_dragonfly_386.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_dragonfly_amd64.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_386.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_amd64.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_freebsd_arm.s View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/runtime/sys_linux_386.s View 1 3 chunks +5 lines, -6 lines 0 comments Download
M src/pkg/runtime/sys_linux_amd64.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_linux_arm.s View 1 4 chunks +9 lines, -6 lines 0 comments Download
M src/pkg/runtime/sys_nacl_386.s View 1 1 chunk +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_nacl_amd64p32.s View 1 2 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/runtime/sys_netbsd_386.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_netbsd_amd64.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_netbsd_arm.s View 1 3 chunks +5 lines, -4 lines 0 comments Download
M src/pkg/runtime/sys_openbsd_386.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_openbsd_amd64.s View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/pkg/runtime/sys_plan9_386.s View 1 4 chunks +6 lines, -4 lines 0 comments Download
M src/pkg/runtime/sys_plan9_amd64.s View 1 4 chunks +6 lines, -4 lines 0 comments Download
M src/pkg/runtime/sys_solaris_amd64.s View 1 7 chunks +13 lines, -9 lines 0 comments Download
M src/pkg/runtime/sys_windows_386.s View 1 5 chunks +8 lines, -7 lines 0 comments Download
M src/pkg/runtime/sys_windows_amd64.s View 1 4 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/runtime/traceback_arm.c View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/traceback_x86.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/vlop_arm.s View 1 1 chunk +8 lines, -6 lines 0 comments Download

Messages

Total messages: 1
rsc
11 years, 7 months ago (2014-06-16 16:33:55 UTC) #1
*** Abandoned ***
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b