1. 27 Mar, 2017 5 commits
    • Josh Bleecher Snyder's avatar
      cmd/internal/dwarf: remove global encbuf · f9783011
      Josh Bleecher Snyder authored
      The global encbuf helped avoid allocations.
      It is incompatible with a concurrent backend.
      To avoid a performance regression while removing it,
      introduce two optimizations.
      First, re-use a buffer in dwarf.PutFunc.
      Second, avoid a buffer entirely when the int
      being encoded fits in seven bits, which is about 75%
      of the time.
      
      Passes toolstash-check.
      
      Updates #15756
      
      
      name       old alloc/op    new alloc/op    delta
      Template      40.6MB ± 0%     40.6MB ± 0%  -0.08%  (p=0.001 n=8+9)
      Unicode       29.9MB ± 0%     29.9MB ± 0%    ~     (p=0.068 n=8+10)
      GoTypes        116MB ± 0%      116MB ± 0%  +0.05%  (p=0.043 n=10+9)
      SSA            864MB ± 0%      864MB ± 0%  +0.01%  (p=0.010 n=10+9)
      Flate         25.8MB ± 0%     25.8MB ± 0%    ~     (p=0.353 n=10+10)
      GoParser      32.2MB ± 0%     32.2MB ± 0%    ~     (p=0.353 n=10+10)
      Reflect       80.2MB ± 0%     80.2MB ± 0%    ~     (p=0.165 n=10+10)
      Tar           27.0MB ± 0%     26.9MB ± 0%    ~     (p=0.143 n=10+10)
      XML           42.8MB ± 0%     42.8MB ± 0%    ~     (p=0.400 n=10+9)
      
      name       old allocs/op   new allocs/op   delta
      Template        398k ± 0%       397k ± 0%  -0.20%  (p=0.002 n=8+9)
      Unicode         320k ± 0%       321k ± 1%    ~     (p=0.122 n=8+10)
      GoTypes        1.16M ± 0%      1.17M ± 0%    ~     (p=0.053 n=10+9)
      SSA            7.65M ± 0%      7.65M ± 0%    ~     (p=0.122 n=10+8)
      Flate           240k ± 1%       240k ± 1%    ~     (p=0.243 n=10+9)
      GoParser        322k ± 1%       322k ± 1%    ~     (p=0.481 n=10+10)
      Reflect        1.00M ± 0%      1.00M ± 0%    ~     (p=0.211 n=9+10)
      Tar             256k ± 0%       255k ± 1%    ~     (p=0.052 n=10+10)
      XML             400k ± 1%       400k ± 0%    ~     (p=0.631 n=10+10)
      
      
      Change-Id: Ia39d9de09232fdbfc9c9cec14587bbf6939c9492
      Reviewed-on: https://go-review.googlesource.com/38713
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      f9783011
    • Brad Fitzpatrick's avatar
      net/http/httptest: don't panic on Close of user-constructed Server value · 89ebe5bb
      Brad Fitzpatrick authored
      If the user created an httptest.Server directly without using a
      constructor it won't have the new unexported 'client' field. So don't
      assume it's non-nil.
      
      Fixes #19729
      
      Change-Id: Ie92e5da66cf4e7fb8d95f3ad0f4e3987d3ae8b77
      Reviewed-on: https://go-review.googlesource.com/38710
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKevin Burke <kev@inburke.com>
      89ebe5bb
    • Austin Clements's avatar
      runtime: improve systemstack-on-Go stack message · 4234d1de
      Austin Clements authored
      We reused the old C stack check mechanism for the implementation of
      //go:systemstack, so when we execute a //go:systemstack function on a
      user stack, the system fails by calling morestackc. However,
      morestackc's message still talks about "executing C code".
      
      Fix morestackc's message to reflect its modern usage.
      
      Change-Id: I7e70e7980eab761c0520f675d3ce89486496030f
      Reviewed-on: https://go-review.googlesource.com/38572
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      4234d1de
    • Elias Naur's avatar
      runtime/cgo: raise the thread-local storage slot search limit on Android · 0476c7a7
      Elias Naur authored
      On Android, the thread local offset is found by looping through memory
      starting at the TLS base address. The search is limited to
      PTHREAD_KEYS_MAX, but issue 19472 made it clear that in some cases, the
      slot is located further from the TLS base.
      
      The limit is merely a sanity check in case our assumptions about the
      thread-local storage layout are wrong, so this CL raises it to 384, which
      is enough for the test case in issue 19472.
      
      Fixes #19472
      
      Change-Id: I89d1db3e9739d3a7fff5548ae487a7483c0a278a
      Reviewed-on: https://go-review.googlesource.com/38636
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      0476c7a7
    • Elias Naur's avatar
      runtime/pprof: fix proto tests on NetBSD · aa4c2ca3
      Elias Naur authored
      The proto_test tests are failing on NetBSD:
      
      https://build.golang.org/log/a3a577144ac48c6ef8e384ce6a700ad30549fb78
      
      the failures seem similar to previous failures on Android:
      
      https://build.golang.org/log/b5786e0cd6d5941dc37b6a50be5172f6b99e22f0
      
      The Android failures where fixed by CL 37896. This CL is an attempt
      to fix the NetBSD failures with a similar fix.
      
      Change-Id: I3834afa5b32303ca226e6a31f0f321f66fef9a3f
      Reviewed-on: https://go-review.googlesource.com/38637Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      aa4c2ca3
  2. 26 Mar, 2017 7 commits
  3. 25 Mar, 2017 7 commits
  4. 24 Mar, 2017 21 commits