runtime: free map structures more aggressively

R=rsc, bradfitz, khr
CC=golang-dev
https://codereview.appspot.com/7849047
src/pkg: fixed various typos

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7936043
cmd/gc: fix escape analysis of method values

R=ken2
CC=golang-dev
https://codereview.appspot.com/7518050
crypto/tls: use method values

Currently fails with a compiler error, though.

R=golang-dev, agl, rsc
CC=golang-dev
https://codereview.appspot.com/7933043

Committer: Russ Cox <rsc@golang.org>
cmd/gc: implement more cases in racewalk.

Add missing CLOSUREVAR in switch.
Mark MAKE, string conversion nodes as impossible.
Control statements do not need instrumentation.
Instrument COM and LROT nodes.
Instrument map length.

Update issue 4228

R=dvyukov, golang-dev
CC=golang-dev
https://codereview.appspot.com/7504047
runtime: faster parallel GC
Use per-thread work buffers instead of global mutex-protected pool. This eliminates contention from parallel scan phase.

benchmark                             old ns/op    new ns/op    delta
garbage.BenchmarkTree2-8               97100768     71417553  -26.45%
garbage.BenchmarkTree2LastPause-8     970931485    714103692  -26.45%
garbage.BenchmarkTree2Pause-8         469127802    345029253  -26.45%
garbage.BenchmarkParser-8            2880950854   2715456901   -5.74%
garbage.BenchmarkParserLastPause-8    137047399    103336476  -24.60%
garbage.BenchmarkParserPause-8         80686028     58922680  -26.97%

R=golang-dev, 0xe2.0x9a.0x9b, dave, adg, rsc, iant
CC=golang-dev
https://codereview.appspot.com/7816044
runtime: explicitly remove fd's from epoll waitset before close()
Fixes issue 5061.

Current code relies on the fact that fd's are automatically removed from epoll set when closed. However, it is not true. Underlying file description is removed from epoll set only when *all* fd's referring to it are closed.

There are 2 bad consequences:
1. Kernel delivers notifications on already closed fd's.
2. The following sequence of events leads to error:
   - add fd1 to epoll
   - dup fd1 = fd2
   - close fd1 (not removed from epoll since we've dup'ed the fd)
   - dup fd2 = fd1 (get the same fd as fd1)
   - add fd1 to epoll = EEXIST

So, if fd can be potentially dup'ed of fork'ed, it's necessary to explicitly remove the fd from epoll set.

R=golang-dev, bradfitz, dave
CC=golang-dev
https://codereview.appspot.com/7870043