1. 27 Jul, 2016 1 commit
  2. 26 Jul, 2016 7 commits
  3. 25 Jul, 2016 1 commit
  4. 22 Jul, 2016 1 commit
  5. 21 Jul, 2016 4 commits
    • Brad Fitzpatrick's avatar
      misc/trace: disable trace resolution warning · 243d51f0
      Brad Fitzpatrick authored
      It was removed in upstream Chrome https://codereview.chromium.org/2016863004
      
      Rather than update to the latest version, make the minimal change for Go 1.7 and
      change the "showToUser" boolean from true to false.
      
      Tested by hand that it goes away after this change.
      
      Updates #16247
      
      Change-Id: I051f49da878e554b1a34a88e9abc70ab50e18780
      Reviewed-on: https://go-review.googlesource.com/25117Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      243d51f0
    • David Chase's avatar
      cmd/compile: change phi location to be optimistic at backedges · 846bc6c5
      David Chase authored
      This is:
      
      (1) a simple trick that cuts the number of phi-nodes
      (temporarily) inserted into the ssa representation by a factor
      of 10, and can cut the user time to compile tricky inputs like
      gogo/protobuf tests from 13 user minutes to 9.5, and memory
      allocation from 3.4GB to 2.4GB.
      
      (2) a fix to sparse lookup, that does not rely on
      an assumption proven false by at least one pathological
      input "etldlen".
      
      These two changes fix unrelated compiler performance bugs,
      both necessary to obtain good performance compiling etldlen.
      Without them it takes 20 minutes or longer, with them it
      completes in 2 minutes, without a gigantic memory footprint.
      
      Updates #16407
      
      Change-Id: Iaa8aaa8c706858b3d49de1c4865a7fd79e6f4ff7
      Reviewed-on: https://go-review.googlesource.com/23136Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      Run-TryBot: David Chase <drchase@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      846bc6c5
    • Keith Randall's avatar
      cmd/compile: move phi args which are constants closer to the phi · 305a0ac1
      Keith Randall authored
      entry:
         x = MOVQconst [7]
         ...
      b1:
         goto b2
      b2:
         v = Phi(x, y, z)
      
      Transform that program to:
      
      entry:
         ...
      b1:
         x = MOVQconst [7]
         goto b2
      b2:
         v = Phi(x, y, z)
      
      This CL moves constant-generating instructions used by a phi to the
      appropriate immediate predecessor of the phi's block.
      
      We used to put all constants in the entry block.  Unfortunately, in
      large functions we have lots of constants at the start of the
      function, all of which are used by lots of phis throughout the
      function.  This leads to the constants being live through most of the
      function (especially if there is an outer loop).  That's an O(n^2)
      problem.
      
      Note that most of the non-phi uses of constants have already been
      folded into instructions (ADDQconst, MOVQstoreconst, etc.).
      
      This CL may be generally useful for other instances of compiler
      slowness, I'll have to check.  It may cause some programs to run
      slower, but probably not by much, as rematerializeable values like
      these constants are allocated late (not at their originally scheduled
      location) anyway.
      
      This CL is definitely a minimal change that can be considered for 1.7.
      We probably want to do a better job in the tighten pass generally, not
      just for phi args.  Leaving that for 1.8.
      
      Update #16407
      
      Change-Id: If112a8883b4ef172b2f37dea13e44bda9346c342
      Reviewed-on: https://go-review.googlesource.com/25046
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      305a0ac1
    • Ian Lance Taylor's avatar
      runtime: add explicit `INT $3` at end of Darwin amd64 sigtramp · ff227b8a
      Ian Lance Taylor authored
      The omission of this instruction could confuse the traceback code if a
      SIGPROF occurred during a signal handler.  The traceback code would
      trace up to sigtramp, but would then get confused because it would see a
      PC address that did not appear to be in the function.
      
      Fixes #16453.
      
      Change-Id: I2b3d53e0b272fb01d9c2cb8add22bad879d3eebc
      Reviewed-on: https://go-review.googlesource.com/25104Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      ff227b8a
  6. 20 Jul, 2016 4 commits
    • Austin Clements's avatar
      runtime: support smaller physical pages than PhysPageSize · f407ca92
      Austin Clements authored
      Most operations need an upper bound on the physical page size, which
      is what sys.PhysPageSize is for (this is checked at runtime init on
      Linux). However, a few operations need a *lower* bound on the physical
      page size. Introduce a "minPhysPageSize" constant to act as this lower
      bound and use it where it makes sense:
      
      1) In addrspace_free, we have to query each page in the given range.
         Currently we increment by the upper bound on the physical page
         size, which means we may skip over pages if the true size is
         smaller. Worse, we currently pass a result buffer that only has
         enough room for one page. If there are actually multiple pages in
         the range passed to mincore, the kernel will overflow this buffer.
         Fix these problems by incrementing by the lower-bound on the
         physical page size and by passing "1" for the length, which the
         kernel will round up to the true physical page size.
      
      2) In the write barrier, the bad pointer check tests for pointers to
         the first physical page, which are presumably small integers
         masquerading as pointers. However, if physical pages are smaller
         than we think, we may have legitimate pointers below
         sys.PhysPageSize. Hence, use minPhysPageSize for this test since
         pointers should never fall below that.
      
      In particular, this applies to ARM64 and MIPS. The runtime is
      configured to use 64kB pages on ARM64, but by default Linux uses 4kB
      pages. Similarly, the runtime assumes 16kB pages on MIPS, but both 4kB
      and 16kB kernel configurations are common. This also applies to ARM on
      systems where the runtime is recompiled to deal with a larger page
      size. It is also a step toward making the runtime use only a
      dynamically-queried page size.
      
      Change-Id: I1fdfd18f6e7cbca170cc100354b9faa22fde8a69
      Reviewed-on: https://go-review.googlesource.com/25020Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Austin Clements <austin@google.com>
      f407ca92
    • Dmitry Vyukov's avatar
      runtime/race: fix memory leak · d73ca5f4
      Dmitry Vyukov authored
      The leak was reported internally on a sever canary that runs for days.
      After a day server consumes 5.6GB, after 6 days -- 12.2GB.
      The leak is exposed by the added benchmark.
      The leak is fixed upstream in :
      http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc?view=diff&r1=276102&r2=276103&pathrev=276103
      
      Fixes #16441
      
      Change-Id: I9d4f0adef48ca6cf2cd781b9a6990ad4661ba49b
      Reviewed-on: https://go-review.googlesource.com/25091Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
      d73ca5f4
    • Ian Lance Taylor's avatar
      runtime: add as many extra M's as needed · 50048a4e
      Ian Lance Taylor authored
      When a non-Go thread calls into Go, the runtime needs an M to run the Go
      code. The runtime keeps a list of extra M's available. When the last
      extra M is allocated, the needextram field is set to tell it to allocate
      a new extra M as soon as it is running in Go. This ensures that an extra
      M will always be available for the next thread.
      
      However, if many threads need an extra M at the same time, this
      serializes them all. One thread will get an extra M with the needextram
      field set. All the other threads will see that there is no M available
      and will go to sleep. The one thread that succeeded will create a new
      extra M. One lucky thread will get it. All the other threads will see
      that there is no M available and will go to sleep. The effect is
      thundering herd, as all the threads looking for an extra M go through
      the process one by one. This seems to have a particularly bad effect on
      the FreeBSD scheduler for some reason.
      
      With this change, we track the number of threads waiting for an M, and
      create all of them as soon as one thread gets through. This still means
      that all the threads will fight for the lock to pick up the next M. But
      at least each thread that gets the lock will succeed, instead of going
      to sleep only to fight again.
      
      This smooths out the performance greatly on FreeBSD, reducing the
      average wall time of `testprogcgo CgoCallbackGC` by 74%.  On GNU/Linux
      the average wall time goes down by 9%.
      
      Fixes #13926
      Fixes #16396
      
      Change-Id: I6dc42a4156085a7ed4e5334c60b39db8f8ef8fea
      Reviewed-on: https://go-review.googlesource.com/25047
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDmitry Vyukov <dvyukov@google.com>
      50048a4e
    • Brad Fitzpatrick's avatar
      net/smtp: document that the smtp package is frozen · 883e128f
      Brad Fitzpatrick authored
      This copies the frozen wording from the log/syslog package.
      
      Fixes #16436
      
      Change-Id: If5d478023328925299399f228d8aaf7fb117c1b4
      Reviewed-on: https://go-review.googlesource.com/25080Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      883e128f
  7. 18 Jul, 2016 6 commits
  8. 17 Jul, 2016 1 commit
  9. 16 Jul, 2016 1 commit
  10. 15 Jul, 2016 1 commit
  11. 14 Jul, 2016 1 commit
  12. 13 Jul, 2016 5 commits
  13. 12 Jul, 2016 4 commits
  14. 11 Jul, 2016 3 commits