1. 07 Apr, 2017 10 commits
  2. 06 Apr, 2017 16 commits
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: remove a bunch of uses of iterField · 385c13cf
      Matthew Dempsky authored
      Passes toolstash-check -all.
      
      Change-Id: I9fb91dd78dff149b5e1e1329d00855fd41f12523
      Reviewed-on: https://go-review.googlesource.com/39796
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      385c13cf
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: simplify export info · a680a85e
      Matthew Dempsky authored
      Followup to previous typenod CL. Changes export data format, but only
      the compiler-specific section, so no version bump.
      
      Change-Id: I0c21737141f3d257366b29b2a9211bc7217c39ee
      Reviewed-on: https://go-review.googlesource.com/39797
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a680a85e
    • Matthew Dempsky's avatar
      cmd/compile/internal/gc: remove a bunch of uses of typenod · 2e1b42a8
      Matthew Dempsky authored
      Passes toolstash-check -all.
      
      Change-Id: Ic9eb0c52bedac185ab86cc62207f199d93700344
      Reviewed-on: https://go-review.googlesource.com/39795
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      2e1b42a8
    • Josh Bleecher Snyder's avatar
      cmd/compile: remove forceObjFileStability · 25fc842f
      Josh Bleecher Snyder authored
      The textual import/export format is ancient history.
      
      Change-Id: Iebe90bfd9bd3074eb191186d86e5f4286ce3b1f3
      Reviewed-on: https://go-review.googlesource.com/39850
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      25fc842f
    • Josh Bleecher Snyder's avatar
      cmd/compile: make typenamesym do less work · 91433eb5
      Josh Bleecher Snyder authored
      typenamesym is called from three places:
      typename, ngotype, and Type.Symbol.
      Only in typename do we actually need a Node.
      ngotype and Type.Symbol require only a Sym.
      And writing the newly created Node to
      Sym.Def is unsafe in a concurrent backend.
      Rather than use a mutex protect to Sym.Def,
      make typenamesym not touch Sym.Def.
      
      The assignment to Sym.Def was serving a second purpose,
      namely to prevent duplicate entries on signatlist.
      Preserve that functionality by switching signatlist to a map.
      This in turn requires that we sort signatlist
      when exporting it, to preserve reproducibility.
      
      We'd like to use Type.cmp for sorting,
      but that causes infinite recursion at the moment;
      see #19869.
      
      For now, use Type.LongString as the sort key,
      which is a complete description of the type.
      Type.LongString is relatively expensive,
      but we calculate it only once per type,
      and signatlist is generally fairly small,
      so the performance impact is minimal.
      
      Updates #15756
      
      name       old alloc/op    new alloc/op    delta
      Template      39.4MB ± 0%     39.4MB ± 0%    ~     (p=0.222 n=5+5)
      Unicode       29.8MB ± 0%     29.8MB ± 0%    ~     (p=0.151 n=5+5)
      GoTypes        113MB ± 0%      113MB ± 0%    ~     (p=0.095 n=5+5)
      SSA           1.25GB ± 0%     1.25GB ± 0%  +0.04%  (p=0.008 n=5+5)
      Flate         25.3MB ± 0%     25.4MB ± 0%    ~     (p=0.056 n=5+5)
      GoParser      31.8MB ± 0%     31.8MB ± 0%    ~     (p=0.310 n=5+5)
      Reflect       78.3MB ± 0%     78.3MB ± 0%    ~     (p=0.690 n=5+5)
      Tar           26.7MB ± 0%     26.7MB ± 0%    ~     (p=0.548 n=5+5)
      XML           42.2MB ± 0%     42.2MB ± 0%    ~     (p=0.222 n=5+5)
      
      name       old allocs/op   new allocs/op   delta
      Template        387k ± 0%       388k ± 0%    ~     (p=0.056 n=5+5)
      Unicode         320k ± 0%       321k ± 0%  +0.32%  (p=0.032 n=5+5)
      GoTypes        1.14M ± 0%      1.15M ± 0%    ~     (p=0.095 n=5+5)
      SSA            9.70M ± 0%      9.72M ± 0%  +0.18%  (p=0.008 n=5+5)
      Flate           234k ± 0%       235k ± 0%  +0.60%  (p=0.008 n=5+5)
      GoParser        317k ± 0%       317k ± 0%    ~     (p=1.000 n=5+5)
      Reflect         982k ± 0%       983k ± 0%    ~     (p=0.841 n=5+5)
      Tar             252k ± 1%       252k ± 0%    ~     (p=0.310 n=5+5)
      XML             393k ± 0%       392k ± 0%    ~     (p=0.548 n=5+5)
      
      Change-Id: I53a3b95d19cf1a7b7511a94fba896706addf84fb
      Reviewed-on: https://go-review.googlesource.com/39710
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      91433eb5
    • Kale Blankenship's avatar
      net/http: add tests for http2 Server WriteTimeout enforcement per stream · b599c1fe
      Kale Blankenship authored
      Updates #18437
      
      Change-Id: Iaa8a35d18eca8be24763dd151ad9e324ecbf7f7b
      Reviewed-on: https://go-review.googlesource.com/34726
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      b599c1fe
    • Josh Bleecher Snyder's avatar
      cmd/internal/obj: unify creation of numeric literal syms · 99683483
      Josh Bleecher Snyder authored
      This is a straightforward refactoring,
      to reduce the scope of upcoming changes.
      
      The symbol size and AttrLocal=true was not
      set universally, but it appears not to matter,
      since toolstash -cmp is happy.
      
      Passes toolstash-check -all.
      
      Change-Id: I7f8392f939592d3a1bc6f61dec992f5661f42fca
      Reviewed-on: https://go-review.googlesource.com/39791
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      99683483
    • Josh Bleecher Snyder's avatar
      cmd/internal/obj: remove Linklookup · c3114882
      Josh Bleecher Snyder authored
      It was simply a wrapper around Link.Lookup.
      Unwrap everything.
      
      CL prepared using eg with template:
      
      package p
      
      import "cmd/internal/obj"
      
      func before(ctxt *obj.Link, name string, version int) *obj.LSym {
      	return obj.Linklookup(ctxt, name, version)
      }
      
      func after(ctxt *obj.Link, name string, version int) *obj.LSym {
      	return ctxt.Lookup(name, version)
      }
      
      Then one comment in cmd/asm/internal/asm/parse.go
      was manually updated (and gofmt'ed!),
      and func Linklookup deleted.
      
      Passes toolstash-check (as a sanity measure).
      
      Change-Id: Icc4d56b0b2b5c8888d3184c1898c48359ea1e638
      Reviewed-on: https://go-review.googlesource.com/39715
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      c3114882
    • Daniel Martí's avatar
      net/http: fix ineffective break in etag scanning · 2c1888bf
      Daniel Martí authored
      In particular, this lead to the code accepting invalid ETags as long as
      they finished with a '"'.
      
      Also remove a duplicate test case.
      
      Change-Id: Id59db3ebc4e4969562f891faef29111e77ee0e65
      Reviewed-on: https://go-review.googlesource.com/39690
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      2c1888bf
    • Cherry Zhang's avatar
      cmd/internal/obj/arm64: fix encoding of AND MBCON · 0bae9b08
      Cherry Zhang authored
      When a constant is both MOVCON (can fit into a MOV instruction)
      and BITCON (can fit into a logical instruction), the assembler
      chooses to use the MOVCON encoding, which is actually longer for
      logical instructions. We add MBCON rules explicitly to make sure
      it uses the BITCON encoding.
      
      Updates #19857.
      
      Change-Id: Ib9881be363cbc491ac2a0792b36b87e74eff34a8
      Reviewed-on: https://go-review.googlesource.com/39652
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      0bae9b08
    • Cherry Zhang's avatar
      cmd/compile: use ANDconst to mask out leading/trailing bits on ARM64 · 257b01f8
      Cherry Zhang authored
      For an AND that masks out leading or trailing bits, generic rules
      rewrite it to a pair of shifts. On ARM64, the mask actually can
      fit into an AND instruction. So we rewrite it back to AND.
      
      Fixes #19857.
      
      Change-Id: I479d7320ae4f29bb3f0056d5979bde4478063a8f
      Reviewed-on: https://go-review.googlesource.com/39651
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      257b01f8
    • Jeff Wendling's avatar
      cmd/dist: disable plugin test on linux-arm with GOARM=5 · 168eb9cf
      Jeff Wendling authored
      Plugin support is patchy at the moment, so disable the test for
      now until the test can be fixed. This way, we can get builders
      for ARMv5 running for the rest of the code.
      
      Updates #19674
      
      Change-Id: I08aa211c08a85688656afe2ad2e680a2a6e5dfac
      Reviewed-on: https://go-review.googlesource.com/39716Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      168eb9cf
    • Daniel Martí's avatar
      runtime: remove unused parameter from bestFitTreap · 4e7724b2
      Daniel Martí authored
      This code was added recently, and it doesn't seem like the parameter
      will be useful in the near future.
      
      Change-Id: I5d64dadb6820c159b588262ab90df2461b5fdf04
      Reviewed-on: https://go-review.googlesource.com/39692
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      4e7724b2
    • Josh Bleecher Snyder's avatar
      cmd/compile: add Prog cache to Progs · 5c359d80
      Josh Bleecher Snyder authored
      The existing bulk/cached Prog allocator, Ctxt.NewProg, is not concurrency-safe.
      This CL moves Prog allocation to its clients, the compiler and the assembler.
      
      The assembler is so fast and generates so few Progs that it does not need
      optimization of Prog allocation. I could not generate measureable changes.
      And even if I could, the assembly is a miniscule portion of build times.
      
      The compiler already has a natural place to manage Prog allocation;
      this CL migrates the Prog cache there.
      It will be made concurrency-safe in a later CL by
      partitioning the Prog cache into chunks and assigning each chunk
      to a different goroutine to manage.
      
      This CL does cause a performance degradation when the compiler
      is invoked with the -S flag (to dump assembly).
      However, such usage is rare and almost always done manually.
      The one instance I know of in a test is TestAssembly
      in cmd/compile/internal/gc, and I did not detect
      a measurable performance impact there.
      
      Passes toolstash-check -all.
      Minor compiler performance impact.
      
      Updates #15756
      
      Performance impact from just this CL:
      
      name        old time/op     new time/op     delta
      Template        213ms ± 4%      213ms ± 4%    ~     (p=0.571 n=49+49)
      Unicode        89.1ms ± 3%     89.4ms ± 3%    ~     (p=0.388 n=47+48)
      GoTypes         581ms ± 2%      584ms ± 3%  +0.56%  (p=0.019 n=47+48)
      SSA             6.48s ± 2%      6.53s ± 2%  +0.84%  (p=0.000 n=47+49)
      Flate           128ms ± 4%      128ms ± 4%    ~     (p=0.832 n=49+49)
      GoParser        152ms ± 3%      152ms ± 3%    ~     (p=0.815 n=48+47)
      Reflect         371ms ± 4%      371ms ± 3%    ~     (p=0.617 n=50+47)
      Tar             112ms ± 4%      112ms ± 3%    ~     (p=0.724 n=49+49)
      XML             208ms ± 3%      208ms ± 4%    ~     (p=0.678 n=49+50)
      [Geo mean]      284ms           285ms       +0.18%
      
      name        old user-ns/op  new user-ns/op  delta
      Template         251M ± 7%       252M ±11%    ~     (p=0.704 n=49+50)
      Unicode          107M ± 7%       108M ± 5%  +1.25%  (p=0.036 n=50+49)
      GoTypes          738M ± 3%       740M ± 3%    ~     (p=0.305 n=49+48)
      SSA             8.83G ± 2%      8.86G ± 4%    ~     (p=0.098 n=47+50)
      Flate            146M ± 6%       147M ± 3%    ~     (p=0.584 n=48+41)
      GoParser         178M ± 6%       179M ± 5%  +0.93%  (p=0.036 n=49+48)
      Reflect          441M ± 4%       446M ± 7%    ~     (p=0.218 n=44+49)
      Tar              126M ± 5%       126M ± 5%    ~     (p=0.766 n=48+49)
      XML              245M ± 5%       244M ± 4%    ~     (p=0.359 n=50+50)
      [Geo mean]       341M            342M       +0.51%
      
      Performance impact from this CL combined with its parent:
      
      name        old time/op     new time/op     delta
      Template        213ms ± 3%      214ms ± 4%    ~     (p=0.685 n=47+50)
      Unicode        89.8ms ± 6%     90.5ms ± 6%    ~     (p=0.055 n=50+50)
      GoTypes         584ms ± 3%      585ms ± 2%    ~     (p=0.710 n=49+47)
      SSA             6.50s ± 2%      6.53s ± 2%  +0.39%  (p=0.011 n=46+50)
      Flate           128ms ± 3%      128ms ± 4%    ~     (p=0.855 n=47+49)
      GoParser        152ms ± 3%      152ms ± 3%    ~     (p=0.666 n=49+49)
      Reflect         371ms ± 3%      372ms ± 3%    ~     (p=0.298 n=48+48)
      Tar             112ms ± 5%      113ms ± 3%    ~     (p=0.107 n=49+49)
      XML             208ms ± 3%      208ms ± 2%    ~     (p=0.881 n=50+49)
      [Geo mean]      285ms           285ms       +0.26%
      
      name        old user-ns/op  new user-ns/op  delta
      Template         254M ± 9%       252M ± 8%    ~     (p=0.290 n=49+50)
      Unicode          106M ± 6%       108M ± 7%  +1.44%  (p=0.034 n=50+50)
      GoTypes          741M ± 4%       743M ± 4%    ~     (p=0.992 n=50+49)
      SSA             8.86G ± 2%      8.83G ± 3%    ~     (p=0.158 n=47+49)
      Flate            147M ± 4%       148M ± 5%    ~     (p=0.832 n=50+49)
      GoParser         179M ± 5%       178M ± 5%    ~     (p=0.370 n=48+50)
      Reflect          441M ± 6%       445M ± 7%    ~     (p=0.246 n=45+47)
      Tar              126M ± 6%       126M ± 6%    ~     (p=0.815 n=49+50)
      XML              244M ± 3%       245M ± 4%    ~     (p=0.190 n=50+50)
      [Geo mean]       342M            342M       +0.17%
      
      Change-Id: I020f1c079d495fbe2e15ccb51e1ea2cc1b5a1855
      Reviewed-on: https://go-review.googlesource.com/39634
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      5c359d80
    • Robert Griesemer's avatar
      cmd/compile: remove InterMethod type - not used anywhere · 52d8d7b9
      Robert Griesemer authored
      Change-Id: I2c402d9491b373316775b515ce389555e58acb1a
      Reviewed-on: https://go-review.googlesource.com/39636
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      52d8d7b9
    • Josh Bleecher Snyder's avatar
      cmd/compile: teach assemblers to accept a Prog allocator · 5b59b32c
      Josh Bleecher Snyder authored
      The existing bulk Prog allocator is not concurrency-safe.
      To allow for concurrency-safe bulk allocation of Progs,
      I want to move Prog allocation and caching upstream,
      to the clients of cmd/internal/obj.
      
      This is a preliminary enabling refactoring.
      After this CL, instead of calling Ctxt.NewProg
      throughout the assemblers, we thread through
      a newprog function that returns a new Prog.
      
      That function is set up to be Ctxt.NewProg,
      so there are no real changes in this CL;
      this CL only establishes the plumbing.
      
      Passes toolstash-check -all.
      Negligible compiler performance impact.
      
      Updates #15756
      
      name        old time/op     new time/op     delta
      Template        213ms ± 3%      214ms ± 4%    ~     (p=0.574 n=49+47)
      Unicode        90.1ms ± 5%     89.9ms ± 4%    ~     (p=0.417 n=50+49)
      GoTypes         585ms ± 4%      584ms ± 3%    ~     (p=0.466 n=49+49)
      SSA             6.50s ± 3%      6.52s ± 2%    ~     (p=0.251 n=49+49)
      Flate           128ms ± 4%      128ms ± 4%    ~     (p=0.673 n=49+50)
      GoParser        152ms ± 3%      152ms ± 3%    ~     (p=0.810 n=48+49)
      Reflect         372ms ± 4%      372ms ± 5%    ~     (p=0.778 n=49+50)
      Tar             113ms ± 5%      111ms ± 4%  -0.98%  (p=0.016 n=50+49)
      XML             208ms ± 3%      208ms ± 2%    ~     (p=0.483 n=47+49)
      [Geo mean]      285ms           285ms       -0.17%
      
      name        old user-ns/op  new user-ns/op  delta
      Template         253M ± 8%       254M ± 9%    ~     (p=0.899 n=50+50)
      Unicode          106M ± 9%       106M ±11%    ~     (p=0.642 n=50+50)
      GoTypes          736M ± 4%       740M ± 4%    ~     (p=0.121 n=50+49)
      SSA             8.82G ± 3%      8.88G ± 2%  +0.65%  (p=0.006 n=49+48)
      Flate            147M ± 4%       147M ± 5%    ~     (p=0.844 n=47+48)
      GoParser         179M ± 4%       178M ± 6%    ~     (p=0.785 n=50+50)
      Reflect          443M ± 6%       441M ± 5%    ~     (p=0.850 n=48+47)
      Tar              126M ± 5%       126M ± 5%    ~     (p=0.734 n=50+50)
      XML              244M ± 5%       244M ± 5%    ~     (p=0.594 n=49+50)
      [Geo mean]       341M            341M       +0.11%
      
      Change-Id: Ice962f61eb3a524c2db00a166cb582c22caa7d68
      Reviewed-on: https://go-review.googlesource.com/39633
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      5b59b32c
  3. 05 Apr, 2017 10 commits
  4. 04 Apr, 2017 4 commits