An error occurred fetching the project authors.
  1. 15 Oct, 2018 1 commit
  2. 14 Jul, 2017 1 commit
  3. 09 Jan, 2017 1 commit
    • David Chase's avatar
      cmd/compile: insert scheduling checks on loop backedges · 7f1ff65c
      David Chase authored
      Loop breaking with a counter.  Benchmarked (see comments),
      eyeball checked for sanity on popular loops.  This code
      ought to handle loops in general, and properly inserts phi
      functions in cases where the earlier version might not have.
      
      Includes test, plus modifications to test/run.go to deal with
      timeout and killing looping test.  Tests broken by the addition
      of extra code (branch frequency and live vars) for added
      checks turn the check insertion off.
      
      If GOEXPERIMENT=preemptibleloops, the compiler inserts reschedule
      checks on every backedge of every reducible loop.  Alternately,
      specifying GO_GCFLAGS=-d=ssa/insert_resched_checks/on will
      enable it for a single compilation, but because the core Go
      libraries contain some loops that may run long, this is less
      likely to have the desired effect.
      
      This is intended as a tool to help in the study and diagnosis
      of GC and other latency problems, now that goal STW GC latency
      is on the order of 100 microseconds or less.
      
      Updates #17831.
      Updates #10958.
      
      Change-Id: I6206c163a5b0248e3f21eb4fc65f73a179e1f639
      Reviewed-on: https://go-review.googlesource.com/33910
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      7f1ff65c
  4. 26 May, 2016 1 commit
  5. 16 May, 2016 1 commit
    • David Chase's avatar
      cmd/compile: use sparse algorithm for phis in large program · 6b99fb5b
      David Chase authored
      This adds a sparse method for locating nearest ancestors
      in a dominator tree, and checks blocks with more than one
      predecessor for differences and inserts phi functions where
      there are.
      
      Uses reversed post order to cut number of passes, running
      it from first def to last use ("last use" for paramout and
      mem is end-of-program; last use for a phi input from a
      backedge is the source of the back edge)
      
      Includes a cutover from old algorithm to new to avoid paying
      large constant factor for small programs.  This keeps normal
      builds running at about the same time, while not running
      over-long on large machine-generated inputs.
      
      Add "phase" flags for ssa/build -- ssa/build/stats prints
      number of blocks, values (before and after linking references
      and inserting phis, so expansion can be measured), and their
      product; the product governs the cutover, where a good value
      seems to be somewhere between 1 and 5 million.
      
      Among the files compiled by make.bash, this is the shape of
      the tail of the distribution for #blocks, #vars, and their
      product:
      
      	 #blocks	#vars	    product
       max	6171	28180	173,898,780
      99.9%	1641	 6548	 10,401,878
        99%	 463	 1909	    873,721
        95%	 152	  639	     95,235
        90%	  84	  359	     30,021
      
      The old algorithm is indeed usually fastest, for 99%ile
      values of usually.
      
      The fix to LookupVarOutgoing
      ( https://go-review.googlesource.com/#/c/22790/ )
      deals with some of the same problems addressed by this CL,
      but on at least one bug ( #15537 ) this change is still
      a significant help.
      
      With this CL:
      /tmp/gopath$ rm -rf pkg bin
      /tmp/gopath$ time go get -v -gcflags -memprofile=y.mprof \
         github.com/gogo/protobuf/test/theproto3/combos/...
      ...
      real	4m35.200s
      user	13m16.644s
      sys	0m36.712s
      and pprof reports 3.4GB allocated in one of the larger profiles
      
      With tip:
      /tmp/gopath$ rm -rf pkg bin
      /tmp/gopath$ time go get -v -gcflags -memprofile=y.mprof \
         github.com/gogo/protobuf/test/theproto3/combos/...
      ...
      real	10m36.569s
      user	25m52.286s
      sys	4m3.696s
      and pprof reports 8.3GB allocated in the same larger profile
      
      With this CL, most of the compilation time on the benchmarked
      input is spent in register/stack allocation (cumulative 53%)
      and in the sparse lookup algorithm itself (cumulative 20%).
      
      Fixes #15537.
      
      Change-Id: Ia0299dda6a291534d8b08e5f9883216ded677a00
      Reviewed-on: https://go-review.googlesource.com/22342Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      6b99fb5b
  6. 13 Apr, 2016 1 commit
    • Todd Neal's avatar
      cmd/compile: sort partitions by dom to speed up cse · 3ea7cfab
      Todd Neal authored
      We do two O(n) scans of all values in an eqclass when computing
      substitutions for CSE.
      
      In unfortunate cases, like those found in #15112, we can have a large
      eqclass composed of values found in blocks none of whom dominate the
      other.  This leads to O(n^2) behavior. The elements are removed one at a
      time, with O(n) scans each time.
      
      This CL removes the linear scan by sorting the eqclass so that dominant
      values will be sorted first.  As long as we also ensure we don't disturb
      the sort order, then we no longer need to scan for the maximally
      dominant value.
      
      For the code in issue #15112:
      
      Before:
      real    1m26.094s
      user    1m30.776s
      sys     0m1.125s
      
      Aefter:
      real    0m52.099s
      user    0m56.829s
      sys     0m1.092s
      
      Updates #15112
      
      Change-Id: Ic4f8680ed172e716232436d31963209c146ef850
      Reviewed-on: https://go-review.googlesource.com/21981Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      Run-TryBot: Todd Neal <todd@tneal.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3ea7cfab
  7. 02 Mar, 2016 1 commit
    • Brad Fitzpatrick's avatar
      all: single space after period. · 5fea2ccc
      Brad Fitzpatrick authored
      The tree's pretty inconsistent about single space vs double space
      after a period in documentation. Make it consistently a single space,
      per earlier decisions. This means contributors won't be confused by
      misleading precedence.
      
      This CL doesn't use go/doc to parse. It only addresses // comments.
      It was generated with:
      
      $ perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')
      $ go test go/doc -update
      
      Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
      Reviewed-on: https://go-review.googlesource.com/20022Reviewed-by: default avatarRob Pike <r@golang.org>
      Reviewed-by: default avatarDave Day <djd@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5fea2ccc
  8. 28 Feb, 2016 1 commit
  9. 09 Sep, 2015 1 commit