Permalink
Switch branches/tags
Commits on Aug 15, 2016
  1. [dev.ssa] cmd/compile: PPC64, FP to/from int conversions.

    dr2chase committed Aug 10, 2016
    Passes ssa_test.
    
    Requires a few new instructions and some scratchpad
    memory to move data between G and F registers.
    
    Also fixed comparisons to be correct in case of NaN.
    Added missing instructions for run.bash.
    Removed some FP registers that are apparently "reserved"
    (but that are also apparently also unused except for a
    gratuitous multiplication by two when y = x+x would work
    just as well).
    
    Currently failing stack splits.
    
    Updates #16010.
    
    Change-Id: I73b161bfff54445d72bd7b813b1479f89fc72602
    Reviewed-on: https://go-review.googlesource.com/26813
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Cherry Zhang <cherryyz@google.com>
  2. [dev.ssa] cmd/compile, etc.: more ARM64 optimizations, and enable SSA…

    cherrymui committed Aug 10, 2016
    … by default
    
    Add more ARM64 optimizations:
    - use hardware zero register when it is possible.
    - use shifted ops.
      The assembler supports shifted ops but not documented, nor knows
      how to print it. This CL adds them.
    - enable fast division.
      This was disabled because it makes the old backend generate slower
      code. But with SSA it generates faster code.
    
    Turn on SSA by default, also adjust tests.
    
    Change-Id: I7794479954c83bb65008dcb457bc1e21d7496da6
    Reviewed-on: https://go-review.googlesource.com/26950
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
Commits on Aug 11, 2016
  1. [dev.ssa] cmd/compile: simplify 386+PIC+globals a bit

    randall77 committed Aug 11, 2016
    We shouldn't issue instructions like MOVL foo(SB), AX directly from the
    SSA backend.  Instead we should do LEAL foo(SB), AX; MOVL (AX), AX.
    
    This simplifies obj logic because now only LEAL needs to be treated
    specially.  The register allocator uses the LEAL to in effect allocate
    the temporary register required for the shared library thunk calls.
    
    Also, the LEALs can now be CSEd.  So code like
        var g int
        func f() { g += 5 }
    Requires only one thunk call instead of 2.
    
    Change-Id: Ib87d465f617f73af437445871d0ea91a630b2355
    Reviewed-on: https://go-review.googlesource.com/26814
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
  2. [dev.ssa] cmd/compile: fix fp constant loads for 386+PIC

    randall77 committed Aug 11, 2016
    In position-independent 386 code, loading floating-point constants from
    the constant pool requires two steps: materializing the address of
    the constant pool entry (requires calling a thunk) and then loading
    from that address.
    
    Before this CL, the materializing happened implicitly in CX, which
    clobbered that register.
    
    Change-Id: Id094e0fb2d3be211089f299e8f7c89c315de0a87
    Reviewed-on: https://go-review.googlesource.com/26811
    Run-TryBot: Keith Randall <khr@golang.org>
    Reviewed-by: David Crawshaw <crawshaw@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  3. [dev.ssa] cmd/compile: add some ARM64 optimizations

    cherrymui committed Aug 3, 2016
    Mostly mirrors ARM, includes:
    - constant folding
    - simplification of load, store, extension, and arithmetics
    - nilcheck removal
    
    Change-Id: Iffaa5fcdce100fe327429ecab316cb395e543469
    Reviewed-on: https://go-review.googlesource.com/26710
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
Commits on Aug 10, 2016
  1. [dev.ssa] cmd/internal/obj/arm64: fix encoding constant into some ins…

    cherrymui committed Aug 3, 2016
    …tructions
    
    When a constant can be encoded in a logical instruction (BITCON), do
    it this way instead of using the constant pool. The BITCON testing
    code runs faster than table lookup (using map):
    
    (on AMD64 machine, with pseudo random input)
    BenchmarkIsBitcon-4   	300000000	         4.04 ns/op
    BenchmarkTable-4      	50000000	        27.3 ns/op
    
    The equivalent C code of BITCON testing is formally verified with
    model checker CBMC against linear search of the lookup table.
    
    Also handle cases when a constant can be encoded in a MOV instruction.
    In this case, materializa the constant into REGTMP without using the
    constant pool.
    
    When constants need to be added to the constant pool, make sure to
    check whether it fits in 32-bit. If not, store 64-bit.
    
    Both legacy and SSA compiler backends are happy with this.
    
    Fixes #16226.
    
    Change-Id: I883e3069dee093a1cdc40853c42221a198a152b0
    Reviewed-on: https://go-review.googlesource.com/26631
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    Reviewed-by: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  2. [dev.ssa] cmd/compile: implement GO386=387

    randall77 committed Jul 26, 2016
    Last part of the 386 SSA port.
    
    Modify the x86 backend to simulate SSE registers and
    instructions with 387 registers and instructions.
    The simulation isn't terribly performant, but it works,
    and the old implementation wasn't very performant either.
    Leaving to people who care about 387 to optimize if they want.
    
    Turn on SSA backend for 386 by default.
    
    Fixes #16358
    
    Change-Id: I678fb59132620b2c47e993c1c10c4c21135f70c0
    Reviewed-on: https://go-review.googlesource.com/25271
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Keith Randall <khr@golang.org>
  3. [dev.ssa] cmd/compile: more fixes for 386 shared libraries

    randall77 committed Aug 9, 2016
    Use the destination register for materializing the pc
    for GOT references also. See https://go-review.googlesource.com/c/25442/
    The SSA backend assumes CX does not get clobbered for these instructions.
    
    Mark duffzero as clobbering CX. The linker needs to clobber CX
    to materialize the address to call. (This affects the non-shared-library
    duffzero also, but hopefully forbidding one register across duffzero
    won't be a big deal.)
    
    Hopefully this is all the cases where the linker is clobbering CX
    under the hood and SSA assumes it isn't.
    
    Change-Id: I080c938170193df57cd5ce1f2a956b68a34cc886
    Reviewed-on: https://go-review.googlesource.com/26611
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Commits on Aug 9, 2016
  1. [dev.ssa] cmd/compile: PPC: FP load/store/const/cmp/neg; div/mod

    dr2chase committed Aug 8, 2016
    FP<->int conversions remain.
    
    Updates #16010.
    
    Change-Id: I38d7a4923e34d0a489935fffc4c96c020cafdba2
    Reviewed-on: https://go-review.googlesource.com/25589
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Keith Randall <khr@golang.org>
  2. [dev.ssa] cmd/compile: fix PIC for SSA-generated code

    randall77 committed Aug 3, 2016
    Access to globals requires a 2-instruction sequence on PIC 386.
    
        MOVL foo(SB), AX
    
    is translated by the obj package into:
    
        CALL getPCofNextInstructionInTempRegister(SB)
        MOVL (&foo-&thisInstruction)(tmpReg), AX
    
    The call returns the PC of the next instruction in a register.
    The next instruction then offsets from that register to get the
    address required.  The tricky part is the allocation of the
    temp register.  The legacy compiler always used CX, and forbid
    the register allocator from allocating CX when in PIC mode.
    We can't easily do that in SSA because CX is actually a required
    register for shift instructions. (I think the old backend got away
    with this because the register allocator never uses CX, only
    codegen knows that shifts must use CX.)
    
    Instead, we allow the temp register to be anything.  When the
    destination of the MOV (or LEA) is an integer register, we can
    use that register.  Otherwise, we make sure to compile the
    operation using an LEA to reference the global.  So
    
        MOVL AX, foo(SB)
    
    is never generated directly.  Instead, SSA generates:
    
        LEAL foo(SB), DX
        MOVL AX, (DX)
    
    which is then rewritten by the obj package to:
    
        CALL getPcInDX(SB)
        LEAL (&foo-&thisInstruction)(DX), AX
        MOVL AX, (DX)
    
    So this CL modifies the obj package to use different thunks
    to materialize the pc into different registers.  We use the
    registers that regalloc chose so that SSA can still allocate
    the full set of registers.
    
    Change-Id: Ie095644f7164a026c62e95baf9d18a8bcaed0bba
    Reviewed-on: https://go-review.googlesource.com/25442
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
  3. [dev.ssa] cmd/compile: port SSA backend to amd64p32

    randall77 committed Aug 8, 2016
    It's not a new backend, just a PtrSize==4 modification
    of the existing AMD64 backend.
    
    Change-Id: Icc63521a5cf4ebb379f7430ef3f070894c09afda
    Reviewed-on: https://go-review.googlesource.com/25586
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
Commits on Aug 8, 2016
  1. Merge "[dev.ssa] Merge commit 'f135c326402aaa757aa96aad283a91873d4ae1…

    Gerrit Code Review
    Gerrit Code Review committed Aug 8, 2016
    …24' into mergebranch" into dev.ssa
Commits on Aug 7, 2016
  1. [dev.ssa] cmd/compile: remove flags from regMask

    cherrymui committed Aug 4, 2016
    Reg allocator skips flag-typed values. Flag allocator uses the type
    and whether the op has "clobberFlags" set.
    
    Tested on AMD64, ARM, ARM64, 386. Passed 'toolstash -cmp' on AMD64.
    PPC64 is coded blindly.
    
    Change-Id: Ib1cc27efecef6a1bb27f7d7ed035a582660d244f
    Reviewed-on: https://go-review.googlesource.com/25480
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
Commits on Aug 6, 2016
  1. [dev.ssa] cmd/compile: PPC64, load/store by type, shifts, divisions, …

    dr2chase committed Aug 4, 2016
    …bools
    
    Updates #16010.
    
    Change-Id: Ie520d64fd1c4f881f45623303ed0b7cbdf0e4764
    Reviewed-on: https://go-review.googlesource.com/25493
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Cherry Zhang <cherryyz@google.com>
Commits on Aug 4, 2016
  1. [dev.ssa] cmd/compile: PPC64, add cmp->bool, some shifts, hmul

    dr2chase committed Aug 2, 2016
    Includes hmul (all widths)
    compare for boolean result and simplifications
    shift operations plus changes/additions for implementation
    (ORN, ADDME, ADDC)
    
    Also fixed a backwards-operand CMP.
    
    Change-Id: Id723c4e25125c38e0d9ab9ec9448176b75f4cdb4
    Reviewed-on: https://go-review.googlesource.com/25410
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Cherry Zhang <cherryyz@google.com>
  2. [dev.ssa] Merge commit 'f135c326402aaa757aa96aad283a91873d4ae124' int…

    randall77 committed Aug 4, 2016
    …o mergebranch
    
    Pick up shared library fix in dev.ssa.
    
    Change-Id: I5bdd0e9e0f1d6f7c14b518343ee323ed9a894b9c
  3. runtime: initialize hash algs before typemap

    crawshaw committed Aug 4, 2016
    When compiling with -buildmode=shared, a map[int32]*_type is created for
    each extra module mapping duplicate types back to a canonical object.
    This is done in the function typelinksinit, which is called before the
    init function that sets up the hash functions for the map
    implementation. The result is typemap becomes unusable after
    runtime initialization.
    
    The fix in this CL is to move algorithm init before typelinksinit in
    the runtime setup process. (For 1.8, we may want to turn typemap into
    a sorted slice of types and use binary search.)
    
    Manually tested on GOOS=linux with:
    
    	GOHOSTARCH=386 GOARCH=386 ./make.bash && \
    		go install -buildmode=shared std && \
    		cd ../test && \
    		go run run.go -linkshared
    
    Fixes #16590
    
    Change-Id: Idc08c50cc70d20028276fbf564509d2cd5405210
    Reviewed-on: https://go-review.googlesource.com/25469
    Run-TryBot: David Crawshaw <crawshaw@golang.org>
    Reviewed-by: Keith Randall <khr@golang.org>
  4. [dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranch

    randall77 committed Aug 4, 2016
    Semi-regular merge from tip into dev.ssa.
    
    Change-Id: Iadb60e594ef65a99c0e1404b14205fa67c32a9e9
Commits on Aug 3, 2016
  1. [dev.ssa] cmd/compile: refactor out rulegen value parsing

    josharian committed Jul 1, 2016
    Previously, genMatch0 and genResult0 contained
    lots of duplication: locating the op, parsing
    the value, validation, etc.
    Parsing and validation was mixed in with code gen.
    
    Extract a helper, parseValue. It is responsible
    for parsing the value, locating the op, and doing
    shared validation.
    
    As a bonus (and possibly as my original motivation),
    make op selection pay attention to the number
    of args present.
    This allows arch-specific ops to share a name
    with generic ops as long as there is no ambiguity.
    It also detects and reports unresolved ambiguity,
    unlike before, where it would simply always
    pick the generic op, with no warning.
    
    Also use parseValue when generating the top-level
    op dispatch, to ensure its opinion about ops
    matches genMatch0 and genResult0.
    
    The order of statements in the generated code used
    to depend on the exact rule. It is now somewhat
    independent of the rule. That is the source
    of some of the generated code changes in this CL.
    See rewritedec64 and rewritegeneric for examples.
    It is a one-time change.
    
    The op dispatch switch and functions used to be
    sorted by opname without architecture. The sort
    now includes the architecture, leading to further
    generated code changes.
    See rewriteARM and rewriteAMD64 for examples.
    Again, it is a one-time change.
    
    There are no functional changes.
    
    Change-Id: I22c989183ad5651741ebdc0566349c5fd6c6b23c
    Reviewed-on: https://go-review.googlesource.com/24649
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
    Reviewed-by: Keith Randall <khr@golang.org>
Commits on Aug 2, 2016
  1. VERSION: remove erroneously committed VERSION file

    broady committed Aug 2, 2016
    Change-Id: I1134a4758b7e1a7da243c56f12ad9d2200c8ba41
    Reviewed-on: https://go-review.googlesource.com/25414
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  2. all: merge master into release-branch.go1.7

    broady committed Aug 2, 2016
    Change-Id: I177856ea2bc9943cbde28ca9afa145b6ea5b0942
  3. runtime: fix nanotime for macOS Sierra, again.

    bradfitz committed Aug 2, 2016
    macOS Sierra beta4 changed the kernel interface for getting time.
    DX now optionally points to an address for additional info.
    Set it to zero to avoid corrupting memory.
    
    Fixes #16570
    
    Change-Id: I9f537e552682045325cdbb68b7d0b4ddafade14a
    Reviewed-on: https://go-review.googlesource.com/25400
    Reviewed-by: David Crawshaw <crawshaw@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
    Reviewed-by: Quentin Smith <quentin@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  4. cmd/doc: ensure functions with unexported return values are shown

    dsnet committed Aug 2, 2016
    The commit in golang.org/cl/22354 groups constructors functions under
    the type that they construct to. However, this caused a minor regression
    where functions that had unexported return values were not being printed
    at all. Thus, we forgo the grouping logic if the type the constructor falls
    under is not going to be printed.
    
    Fixes #16568
    
    Change-Id: Idc14f5d03770282a519dc22187646bda676af612
    Reviewed-on: https://go-review.googlesource.com/25369
    Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
    Reviewed-by: Rob Pike <r@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  5. go1.7rc4

    broady committed Aug 2, 2016
    Change-Id: Icf861dd28bfe29a2e4b90529e53644b43b6f7969
    Reviewed-on: https://go-review.googlesource.com/25368
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  6. cmd/doc: handle embedded interfaces properly

    dsnet committed Aug 1, 2016
    Changes made:
    * Disallow star expression on interfaces as this is not possible.
    * Show an embedded "error" in an interface as public similar to
    how godoc does it.
    * Properly handle selector expressions in both structs and interfaces.
    This is possible since a type may refer to something defined in
    another package (e.g. io.Reader).
    
    Before:
    <<<
    $ go doc runtime.Error
    type Error interface {
    
        // RuntimeError is a no-op function but
        // serves to distinguish types that are run time
        // errors from ordinary errors: a type is a
        // run time error if it has a RuntimeError method.
        RuntimeError()
        // Has unexported methods.
    }
    
    $ go doc compress/flate Reader
    doc: invalid program: unexpected type for embedded field
    doc: invalid program: unexpected type for embedded field
    type Reader interface {
        io.Reader
        io.ByteReader
    }
    >>>
    
    After:
    <<<
    $ go doc runtime.Error
    type Error interface {
        error
    
        // RuntimeError is a no-op function but
        // serves to distinguish types that are run time
        // errors from ordinary errors: a type is a
        // run time error if it has a RuntimeError method.
        RuntimeError()
    }
    
    $ go doc compress/flate Reader
    type Reader interface {
        io.Reader
        io.ByteReader
    }
    >>>
    
    Fixes #16567
    
    Change-Id: I272dede971eee9f43173966233eb8810e4a8c907
    Reviewed-on: https://go-review.googlesource.com/25365
    Reviewed-by: Rob Pike <r@golang.org>
    Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  7. all: merge master into release-branch.go1.7

    broady committed Aug 2, 2016
    Change-Id: Ifb9647fa9817ed57aa4835a35a05020aba00a24e
  8. net: prevent cancelation goroutine from adjusting fd timeout after co…

    bradfitz committed Jul 28, 2016
    …nnect
    
    This was previously fixed in https://golang.org/cl/21497 but not enough.
    
    Fixes #16523
    
    Change-Id: I678543a656304c82d654e25e12fb094cd6cc87e8
    Reviewed-on: https://go-review.googlesource.com/25330
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  9. doc/go1.7.html: mention Server.Serve HTTP/2 behavior change

    bradfitz committed Aug 2, 2016
    Fixes #16550
    Updates #15908
    
    Change-Id: Ic951080dbc88f96e4c00cdb3ffe24a5c03079efd
    Reviewed-on: https://go-review.googlesource.com/25389
    Reviewed-by: Chris Broadfoot <cbro@golang.org>
  10. net/http: update bundled http2

    bradfitz committed Aug 1, 2016
    Updates bundled http2 to x/net/http2 rev 28d1bd4f for:
    
        http2: make Transport work around mod_h2 bug
        https://golang.org/cl/25362
    
        http2: don't ignore DATA padding in flow control
        https://golang.org/cl/25382
    
    Updates #16519
    Updates #16556
    Updates #16481
    
    Change-Id: I51f5696e977c91bdb2d80d2d56b8a78e3222da3f
    Reviewed-on: https://go-review.googlesource.com/25388
    Reviewed-by: Chris Broadfoot <cbro@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Aug 1, 2016
  1. [dev.ssa] cmd/compile: PPC64, add more zeroing and moves

    dr2chase committed Jul 27, 2016
    Passes light testing.
    Modified to avoid possible exposure of "exterior" pointers
    to GC.
    
    Updates #16010.
    
    Change-Id: I41fced4fa83cefb9542dff8c8dee1a0c48056b3c
    Reviewed-on: https://go-review.googlesource.com/25310
    Reviewed-by: Cherry Zhang <cherryyz@google.com>
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Jul 29, 2016
  1. cmd/compile: fix possible spill of invalid pointer with DUFFZERO on A…

    cherrymui committed Jul 28, 2016
    …MD64
    
    SSA compiler on AMD64 may spill Duff-adjusted address as scalar. If
    the object is on stack and the stack moves, the spilled address become
    invalid.
    
    Making the spill pointer-typed does not work. The Duff-adjusted address
    points to the memory before the area to be zeroed and may be invalid.
    This may cause stack scanning code panic.
    
    Fix it by doing Duff-adjustment in genValue, so the intermediate value
    is not seen by the reg allocator, and will not be spilled.
    
    Add a test to cover both cases. As it depends on allocation, it may
    be not always triggered.
    
    Fixes #16515.
    
    Change-Id: Ia81d60204782de7405b7046165ad063384ede0db
    Reviewed-on: https://go-review.googlesource.com/25309
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
Commits on Jul 28, 2016
  1. doc/go1.7.html: add known issues section for FreeBSD crashes

    bradfitz committed Jul 27, 2016
    Updates #16396
    
    Change-Id: I7b4f85610e66f2c77c17cf8898cc41d81b2efc8c
    Reviewed-on: https://go-review.googlesource.com/25283
    Reviewed-by: Chris Broadfoot <cbro@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
    Reviewed-by: Andrew Gerrand <adg@golang.org>
  2. [dev.ssa] cmd/compile: fix build for old backend on ARM64

    cherrymui committed Jul 27, 2016
    Apparently the old backend needs NEG instruction having RegRead set,
    even this instruction does not take a Reg field... I don't think SSA
    uses this flag, so just leave it as it was. SSA is still happy.
    
    Fix ARM64 build on https://build.golang.org/?branch=dev.ssa
    
    Change-Id: Ia7e7f2ca217ddae9af314d346af5406bbafb68e8
    Reviewed-on: https://go-review.googlesource.com/25302
    Reviewed-by: David Chase <drchase@google.com>
Commits on Jul 27, 2016
  1. runtime: reduce GC assist extra credit

    rhysh authored and aclements committed Jul 22, 2016
    Mutator goroutines that allocate memory during the concurrent mark
    phase are required to spend some time assisting the garbage
    collector. The magnitude of this mandatory assistance is proportional
    to the goroutine's allocation debt and subject to the assistance
    ratio as calculated by the pacer.
    
    When assisting the garbage collector, a mutator goroutine will go
    beyond paying off its allocation debt. It will build up extra credit
    to amortize the overhead of the assist.
    
    In fast-allocating applications with high assist ratios, building up
    this credit can take the affected goroutine's entire time slice.
    Reduce the penalty on each goroutine being selected to assist the GC
    in two ways, to spread the responsibility more evenly.
    
    First, do a consistent amount of extra scan work without regard for
    the pacer's assistance ratio. Second, reduce the magnitude of the
    extra scan work so it can be completed within a few hundred
    microseconds.
    
    Commentary on gcOverAssistWork is by Austin Clements, originally in
    https://golang.org/cl/24704
    
    Updates #14812
    Fixes #16432
    
    Change-Id: I436f899e778c20daa314f3e9f0e2a1bbd53b43e1
    Reviewed-on: https://go-review.googlesource.com/25155
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Austin Clements <austin@google.com>
    Reviewed-by: Rick Hudson <rlh@golang.org>
    Reviewed-by: Chris Broadfoot <cbro@golang.org>
  2. [dev.ssa] cmd/compile: fix possible invalid pointer spill in large Ze…

    cherrymui committed Jul 27, 2016
    …ro/Move on ARM
    
    Instead of comparing the address of the end of the memory to zero/copy,
    comparing the address of the last element, which is a valid pointer.
    Also unify large and unaligned Zero/Move, by passing alignment as AuxInt.
    
    Fixes #16515 for ARM.
    
    Change-Id: I19a62b31c5acf5c55c16a89bea1039c926dc91e5
    Reviewed-on: https://go-review.googlesource.com/25300
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>