1. 18 Sep, 2014 10 commits
    • David du Colombier's avatar
      runtime: fix handling of GOTRACEBACK · 45143aec
      David du Colombier authored
      Since CL 130990043, the GOTRACEBACK variable is
      only used when the GODEBUG variable is set.
      This change restores the original behavior.
      
      LGTM=rsc
      R=golang-codereviews, aram, gobot, r, rsc
      CC=golang-codereviews
      https://golang.org/cl/132520043
      45143aec
    • Russ Cox's avatar
      runtime: delete panicstring; move its checks into gopanic · c3b5db89
      Russ Cox authored
      In Go 1.3 the runtime called panicstring to report errors like
      divide by zero or memory faults. Now we call panic (gopanic)
      with pre-allocated error values. That new path is missing the
      checking that panicstring did, so add it there.
      
      The only call to panicstring left is in cnew, which is problematic
      because if it fails, probably the heap is corrupt. In that case,
      calling panicstring creates a new errorCString (no allocation there),
      but then panic tries to print it, invoking errorCString.Error, which
      does a string concatenation (allocating), which then dies.
      Replace that one panicstring with a throw: cnew is for allocating
      runtime data structures and should never ask for an inappropriate
      amount of memory.
      
      With panicstring gone, delete newErrorCString, errorCString.
      While we're here, delete newErrorString, not called by anyone.
      (It can't be: that would be C code calling Go code that might
      block or grow the stack.)
      
      Found while debugging a malloc corruption.
      This resulted in 'panic during panic' instead of a more useful message.
      
      LGTM=khr
      R=khr
      CC=golang-codereviews
      https://golang.org/cl/138290045
      c3b5db89
    • Russ Cox's avatar
      os: avoid error result when dir is removed out from under RemoveAll · 98a5f52e
      Russ Cox authored
      Fixes #7776.
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=golang-codereviews, r
      https://golang.org/cl/145860043
      98a5f52e
    • Russ Cox's avatar
      net: disable TestDialMultiFDLeak · 76c75481
      Russ Cox authored
      It fails about 25% of the time on OS X.
      I don't know what it's trying to do.
      Created issue 8764 to correct this, but for now disable.
      
      LGTM=bradfitz, mikioh.mikioh
      R=bradfitz, mikioh.mikioh
      CC=golang-codereviews
      https://golang.org/cl/144070044
      76c75481
    • Dmitriy Vyukov's avatar
      encoding/gob: speedup encoding · dfd4123e
      Dmitriy Vyukov authored
      Replace typeLock with copy-on-write map using atomic.Value.
      
      benchmark                               old ns/op     new ns/op     delta
      BenchmarkEndToEndPipe                   7722          7709          -0.17%
      BenchmarkEndToEndPipe-2                 5114          4344          -15.06%
      BenchmarkEndToEndPipe-4                 3192          2429          -23.90%
      BenchmarkEndToEndPipe-8                 1833          1438          -21.55%
      BenchmarkEndToEndPipe-16                1332          983           -26.20%
      BenchmarkEndToEndPipe-32                1444          675           -53.25%
      BenchmarkEndToEndByteBuffer             6474          6019          -7.03%
      BenchmarkEndToEndByteBuffer-2           4280          2810          -34.35%
      BenchmarkEndToEndByteBuffer-4           2264          1774          -21.64%
      BenchmarkEndToEndByteBuffer-8           1275          979           -23.22%
      BenchmarkEndToEndByteBuffer-16          1257          753           -40.10%
      BenchmarkEndToEndByteBuffer-32          1342          644           -52.01%
      BenchmarkEndToEndArrayByteBuffer        727725        671349        -7.75%
      BenchmarkEndToEndArrayByteBuffer-2      394079        320473        -18.68%
      BenchmarkEndToEndArrayByteBuffer-4      211785        178175        -15.87%
      BenchmarkEndToEndArrayByteBuffer-8      141003        118857        -15.71%
      BenchmarkEndToEndArrayByteBuffer-16     139249        86367         -37.98%
      BenchmarkEndToEndArrayByteBuffer-32     144128        73454         -49.04%
      
      LGTM=r
      R=golang-codereviews, r
      CC=golang-codereviews
      https://golang.org/cl/147720043
      dfd4123e
    • Josh Bleecher Snyder's avatar
      fmt: fix allocation tests · 73a82db1
      Josh Bleecher Snyder authored
      Converting an integer to an interface{} allocates as of CL 130240043.
      
      Fixes #8617.
      
      LGTM=r
      R=r
      CC=golang-codereviews, khr
      https://golang.org/cl/141700043
      73a82db1
    • Mikio Hara's avatar
      net: separate NaCl dependent placeholders from BSD's · 484cc671
      Mikio Hara authored
      To clarify the dependency of NaCl platform.
      
      LGTM=adg
      R=golang-codereviews, adg
      CC=golang-codereviews
      https://golang.org/cl/143830044
      484cc671
    • Dmitriy Vyukov's avatar
      sync/atomic: remove unnecessary race instrumentation in Value · 8c2484ec
      Dmitriy Vyukov authored
      It is left from the time when Value was implemented in assembly.
      Now it is implemented in Go and race detector understands Go.
      In particular the atomic operations must provide
      all necessary synchronization.
      
      LGTM=adg
      R=golang-codereviews, adg
      CC=golang-codereviews, khr, rsc
      https://golang.org/cl/145880043
      8c2484ec
    • Dmitriy Vyukov's avatar
      runtime: output number of goroutines in GC trace · ed7db89b
      Dmitriy Vyukov authored
      Example output:
      gc26(1): 1+0+1038+0 us, 0 -> 1 MB, 19074 (88777-69703) objects, 5 gs, 184/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
      It's useful to understand long scan times,
      because goroutine traceback is slow.
      
      LGTM=khr
      R=golang-codereviews, khr
      CC=golang-codereviews, rsc
      https://golang.org/cl/136310044
      ed7db89b
    • Nigel Tao's avatar
      image/gif: fix GIF encoding of sub-images. · a2910958
      Nigel Tao authored
      benchmark                    old ns/op     new ns/op     delta
      BenchmarkEncode              8641055       8646829       +0.07%
      
      Fixes #7792.
      
      LGTM=r
      R=r
      CC=dbathgate, golang-codereviews
      https://golang.org/cl/147730043
      a2910958
  2. 17 Sep, 2014 13 commits
  3. 16 Sep, 2014 17 commits