1. 08 Oct, 2014 12 commits
    • Michael Hudson-Doyle's avatar
      reflect: add direct call tests to TestMakeFuncVariadic · 14cd40d9
      Michael Hudson-Doyle authored
      TestMakeFuncVariadic only called the variadic function via Call and
      CallSlice, not via a direct function call.
      
      I thought these tests would fail under gccgo tip, but they don't.  Still seems worth having though.
      
      LGTM=iant
      R=golang-codereviews, gobot, iant
      CC=golang-codereviews
      https://golang.org/cl/152060043
      14cd40d9
    • Keith Randall's avatar
      runtime: delay freeing of shrunk stacks until gc is done. · 91e8554b
      Keith Randall authored
      This change prevents confusion in the garbage collector.
      The collector wants to make sure that every pointer it finds
      isn't junk.  Its criteria for junk is (among others) points
      to a "free" span.
      
      Because the stack shrinker modifies pointers in the heap,
      there is a race condition between the GC scanner and the
      shrinker.  The GC scanner can see old pointers (pointers to
      freed stacks).  In particular this happens with SudoG.elem
      pointers.
      
      Normally this is not a problem, as pointers into stack spans
      are ok.  But if the freed stack is the last one in its span,
      the span is marked as "free" instead of "contains stacks".
      
      This change makes sure that even if the GC scanner sees
      an old pointer, the span into which it points is still
      marked as "contains stacks", and thus the GC doesn't
      complain about it.
      
      This change will make the GC pause a tiny bit slower, as
      the stack freeing now happens in serial with the mark pause.
      We could delay the freeing until the mutators start back up,
      but this is the simplest change for now.
      
      TBR=dvyukov
      CC=golang-codereviews
      https://golang.org/cl/158750043
      91e8554b
    • Ian Lance Taylor's avatar
      reflect: add tests for variadic method calls · 6920b2a1
      Ian Lance Taylor authored
      These tests fail when using gccgo.  In gccgo using Interface
      on the value of a method function is implemented using a
      variant of MakeFunc.  That approach did not correctly handle
      variadic functions.
      
      LGTM=r
      R=golang-codereviews, r
      CC=golang-codereviews
      https://golang.org/cl/151280043
      6920b2a1
    • Ian Lance Taylor's avatar
      A+C: Ron Hashimoto (individual CLA) · 83367781
      Ian Lance Taylor authored
      Generated by a+c.
      
      R=gobot
      CC=golang-codereviews
      https://golang.org/cl/153240043
      83367781
    • Dmitriy Vyukov's avatar
      runtime: faster GC scan · b8fdaaf0
      Dmitriy Vyukov authored
      The change contains 3 spot optimizations to scan loop:
      1. Don't use byte vars, use uintptr's instead.
      This seems to alleviate some codegen issue,
      and alone accounts to a half of speedup.
      2. Remove bitmap cache. Currently we cache only 1 byte,
      so caching is not particularly effective anyway.
      Removal of the cache simplifies code and positively affects regalloc.
      3. Replace BitsMultiword switch with if and
      do debug checks only in Debug mode.
      I've benchmarked changes separately and ensured that
      each of them provides speedup on top of the previous one.
      This change as a whole fixes the unintentional regressions
      of scan loop that were introduced during development cycle.
      Fixes #8625.
      Fixes #8565.
      
      On go.benchmarks/garbage benchmark:
      GOMAXPROCS=1
      time:		-3.13%
      cputime:	-3.22%
      gc-pause-one:	-15.71%
      gc-pause-total:	-15.71%
      
      GOMAXPROCS=32
      time:		-1.96%
      cputime:	-4.43%
      gc-pause-one:	-6.22%
      gc-pause-total:	-6.22%
      
      LGTM=khr, rsc
      R=golang-codereviews, khr
      CC=golang-codereviews, rlh, rsc
      https://golang.org/cl/153990043
      b8fdaaf0
    • Russ Cox's avatar
      runtime: clear Defer.fn before removing from the G.defer list · 94bdf134
      Russ Cox authored
      Should fix the remaining 'invalid heap pointer' build failures.
      
      TBR=khr
      CC=golang-codereviews
      https://golang.org/cl/152360043
      94bdf134
    • Russ Cox's avatar
      runtime: fix windows/amd64 build · f950a14b
      Russ Cox authored
      Out of stack space due to new 2-word call in freedefer.
      Go back to smaller function calls.
      
      TBR=brainman
      CC=golang-codereviews
      https://golang.org/cl/152340043
      f950a14b
    • Russ Cox's avatar
      runtime: change Windows M.thread from void* to uintptr · 2b1659b5
      Russ Cox authored
      It appears to be an opaque bit pattern more than a pointer.
      The Go garbage collector has discovered that for m0
      it is set to 0x4c.
      
      Should fix Windows build.
      
      TBR=brainman
      CC=golang-codereviews
      https://golang.org/cl/149640043
      2b1659b5
    • Russ Cox's avatar
      runtime: clear Defer.panic before removing from G.defer list · e6708ee9
      Russ Cox authored
      Another dangling stack pointer in a cached structure.
      Same as SudoG.elem and SudoG.selectdone.
      
      Definitely a fix, and the new test in freedefer makes the
      crash reproducible, but probably not a complete fix.
      I have seen one dangling pointer in a Defer.panic even
      after this fix; I cannot see where it could be coming from.
      
      I think this will fix the solaris build.
      I do not think this will fix the occasional failure on the darwin build.
      
      TBR=khr
      R=khr
      CC=golang-codereviews
      https://golang.org/cl/155080043
      e6708ee9
    • Russ Cox's avatar
      net/rpc: listen on localhost, let kernel pick port · 3492ee5d
      Russ Cox authored
      This avoids a pop-up box on OS X and it avoids
      a test failure if something is using 5555.
      I apologize for not noticing this during the review.
      
      TBR=r
      CC=golang-codereviews
      https://golang.org/cl/152320044
      3492ee5d
    • Andrew Gerrand's avatar
      doc: use "keyed" instead of "tagged" in Go 1 compatibility doc · f3eece74
      Andrew Gerrand authored
      LGTM=bradfitz, r
      R=r, bradfitz
      CC=golang-codereviews
      https://golang.org/cl/156730043
      f3eece74
    • Andrew Gerrand's avatar
      cmd/go: add ImportComment to Package struct · fdc047fb
      Andrew Gerrand authored
      It seems reasonable that people might want to look up the
      ImportComment with "go list".
      
      LGTM=r
      R=golang-codereviews, r
      CC=golang-codereviews
      https://golang.org/cl/143600043
      fdc047fb
  2. 07 Oct, 2014 13 commits
  3. 06 Oct, 2014 15 commits