1. 20 Jul, 2016 3 commits
    • 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
  2. 18 Jul, 2016 6 commits
  3. 17 Jul, 2016 1 commit
  4. 16 Jul, 2016 1 commit
  5. 15 Jul, 2016 1 commit
  6. 14 Jul, 2016 1 commit
  7. 13 Jul, 2016 5 commits
  8. 12 Jul, 2016 4 commits
  9. 11 Jul, 2016 5 commits
  10. 08 Jul, 2016 5 commits
  11. 07 Jul, 2016 3 commits
  12. 06 Jul, 2016 3 commits
  13. 05 Jul, 2016 1 commit
    • Emmanuel Odeke's avatar
      encoding/gob: document Encode, EncodeValue nil pointer panics · 5a9d5c37
      Emmanuel Odeke authored
      Fixes #16258.
      
      Docs for Encode and EncodeValue do not mention that
      nil pointers are not permitted hence we panic,
      because Gobs encode values yet nil pointers have no value
      to encode. It moves a comment that was internal to EncodeValue
      to the top level to make it clearer to users what to expect
      when they pass in nil pointers.
      Supplements test TestTopLevelNilPointer.
      
      Change-Id: Ie54f609fde4b791605960e088456047eb9aa8738
      Reviewed-on: https://go-review.googlesource.com/24740Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
      Run-TryBot: Andrew Gerrand <adg@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5a9d5c37
  14. 04 Jul, 2016 1 commit