1. 20 Mar, 2017 17 commits
  2. 19 Mar, 2017 9 commits
    • Austin Clements's avatar
      runtime: disallow malloc or panic in scavenge · df6025bc
      Austin Clements authored
      Mallocs and panics in the scavenge path are particularly nasty because
      they're likely to silently self-deadlock on the mheap.lock. Avoid
      sinking lots of time into debugging these issues in the future by
      turning these into immediate throws.
      
      Change-Id: Ib36fdda33bc90b21c32432b03561630c1f3c69bc
      Reviewed-on: https://go-review.googlesource.com/38293
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      df6025bc
    • Austin Clements's avatar
      runtime: introduce a type for lfstacks · 13ae271d
      Austin Clements authored
      The lfstack API is still a C-style API: lfstacks all have unhelpful
      type uint64 and the APIs are package-level functions. Make the code
      more readable and Go-style by creating an lfstack type with methods
      for push, pop, and empty.
      
      Change-Id: I64685fa3be0e82ae2d1a782a452a50974440a827
      Reviewed-on: https://go-review.googlesource.com/38290
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      13ae271d
    • Martin Möhrmann's avatar
      cmd/compile: replace all uses of ptrto by typPtr · 2805d206
      Martin Möhrmann authored
      This makes the overall naming and use of the functions
      to create a Type more consistent.
      
      Passes toolstash -cmp.
      
      Change-Id: Ie0d40b42cc32b5ecf5f20502675a225038ea40e4
      Reviewed-on: https://go-review.googlesource.com/38354Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      2805d206
    • Martin Möhrmann's avatar
      cmd/compile: reduce allocs when appending to Node slices · 00f4cacb
      Martin Möhrmann authored
      Rewrite Append function such that the *Node slice argument does not escape.
      
      Passes toolstash -cmp.
      
      name      old alloc/op    new alloc/op    delta
      Template     40.8MB ± 0%     40.8MB ± 0%  -0.17%  (p=0.000 n=20+19)
      Unicode      30.3MB ± 0%     30.2MB ± 0%  -0.11%  (p=0.000 n=19+20)
      GoTypes       115MB ± 0%      115MB ± 0%  -0.20%  (p=0.000 n=20+20)
      Compiler      492MB ± 0%      491MB ± 0%  -0.25%  (p=0.000 n=20+20)
      SSA           858MB ± 0%      858MB ± 0%  -0.08%  (p=0.000 n=20+20)
      Flate        26.2MB ± 0%     26.2MB ± 0%  -0.13%  (p=0.000 n=20+19)
      GoParser     32.5MB ± 0%     32.4MB ± 0%  -0.14%  (p=0.000 n=20+20)
      Reflect      80.6MB ± 0%     80.4MB ± 0%  -0.27%  (p=0.000 n=20+20)
      Tar          27.3MB ± 0%     27.3MB ± 0%  -0.12%  (p=0.000 n=20+19)
      XML          43.1MB ± 0%     43.0MB ± 0%  -0.14%  (p=0.000 n=20+20)
      
      name      old allocs/op   new allocs/op   delta
      Template       400k ± 1%       397k ± 0%  -0.81%  (p=0.000 n=20+18)
      Unicode        321k ± 1%       320k ± 0%  -0.43%  (p=0.000 n=20+20)
      GoTypes       1.17M ± 0%      1.16M ± 0%  -0.89%  (p=0.000 n=20+20)
      Compiler      4.59M ± 0%      4.54M ± 0%  -1.26%  (p=0.000 n=20+19)
      SSA           7.68M ± 0%      7.65M ± 0%  -0.37%  (p=0.000 n=18+18)
      Flate          242k ± 1%       240k ± 1%  -0.70%  (p=0.000 n=20+20)
      GoParser       323k ± 1%       321k ± 1%  -0.64%  (p=0.000 n=20+20)
      Reflect       1.01M ± 0%      1.00M ± 0%  -0.92%  (p=0.000 n=20+19)
      Tar            258k ± 1%       256k ± 1%  -0.60%  (p=0.000 n=20+19)
      XML            403k ± 1%       400k ± 0%  -0.78%  (p=0.000 n=20+20)
      
      Change-Id: Ie1eb603dc46f729574f6a76c08085b2619249be4
      Reviewed-on: https://go-review.googlesource.com/37437Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      00f4cacb
    • Michel Lespinasse's avatar
      cmd/pprof: use proxy from environment · 81bcc470
      Michel Lespinasse authored
      See #18736
      
      Change-Id: I9c16357c05c16db677125d3077ee466b71559c7a
      Reviewed-on: https://go-review.googlesource.com/38343Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      81bcc470
    • Josh Bleecher Snyder's avatar
      cmd/compile: clean up SSA test API · a68e5d94
      Josh Bleecher Snyder authored
      I noted in CL 38327 that the SSA test API felt a bit
      clunky after the ssa.Func/ssa.Cache/ssa.Config refactoring,
      and promised to clean it up once the dust settled.
      The dust has settled.
      
      Along the way, this CL fixes a potential latent bug,
      in which the amd64 test context was used for all dummy Syslook calls.
      The lone SSA test using the s390x context did not depend on the
      Syslook context being correct, so the bug did not arise in practice.
      
      Change-Id: If964251d1807976073ad7f47da0b1f1f77c58413
      Reviewed-on: https://go-review.googlesource.com/38346
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      a68e5d94
    • Josh Bleecher Snyder's avatar
      cmd/compile: canonicalize empty interface types · 62947bed
      Josh Bleecher Snyder authored
      Mapping all empty interfaces onto the same Type
      allows better reuse of the ptrTo and sliceOf
      Type caches for *interface{} and []interface{}.
      
      This has little compiler performance impact now,
      but it will be helpful in the future,
      when we will eagerly populate some of those caches.
      
      Passes toolstash-check.
      
      Change-Id: I17daee599a129b0b2f5f3025c1be43d569d6782c
      Reviewed-on: https://go-review.googlesource.com/38344
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      62947bed
    • Josh Bleecher Snyder's avatar
      cmd/compile: add more types to ssa.Types · 872db799
      Josh Bleecher Snyder authored
      This reduces the number of calls back into the
      gc Type routines, which will help performance
      in a concurrent backend.
      It also reduces the number of callsites
      that must be considered in making the transition.
      
      Passes toolstash-check -all. No compiler performance changes.
      
      Updates #15756
      
      Change-Id: Ic7a8f1daac7e01a21658ae61ac118b2a70804117
      Reviewed-on: https://go-review.googlesource.com/38340
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      872db799
    • Josh Bleecher Snyder's avatar
      cmd/compile: separate ssa.Frontend and ssa.TypeSource · aea3aff6
      Josh Bleecher Snyder authored
      Prior to this CL, the ssa.Frontend field was responsible
      for providing types to the backend during compilation.
      However, the types needed by the backend are few and static.
      It makes more sense to use a struct for them
      and to hang that struct off the ssa.Config,
      which is the correct home for readonly data.
      Now that Types is a struct, we can clean up the names a bit as well.
      
      This has the added benefit of allowing early construction
      of all types needed by the backend.
      This will be useful for concurrent backend compilation.
      
      Passes toolstash-check -all. No compiler performance change.
      
      Updates #15756
      
      Change-Id: I021658c8cf2836d6a22bbc20cc828ac38c7da08a
      Reviewed-on: https://go-review.googlesource.com/38336Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      aea3aff6
  3. 18 Mar, 2017 4 commits
  4. 17 Mar, 2017 10 commits