1. 01 Dec, 2017 31 commits
  2. 30 Nov, 2017 9 commits
    • Tobias Klauser's avatar
      os: remove redundant GOOS checks in chown tests · 45c57e59
      Tobias Klauser authored
      The build tags already prevent the tests from being run on windows or
      plan9, so there is no need to check GOOS again.
      
      Change-Id: I74d3c3b7756d9c50f6e5fd4c3e8b0db618fdebbb
      Reviewed-on: https://go-review.googlesource.com/81295
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      45c57e59
    • Ian Lance Taylor's avatar
      runtime: don't block signals that will kill the program · eb97160f
      Ian Lance Taylor authored
      Otherwise we may delay the delivery of these signals for an arbitrary
      length of time. We are already careful to not block signals that the
      program has asked to see.
      
      Also make sure that we don't miss a signal delivery if a thread
      decides to stop for a while while executing the signal handler.
      
      Also clean up the TestAtomicStop output a little bit.
      
      Fixes #21433
      
      Change-Id: Ic0c1a4eaf7eba80d1abc1e9537570bf4687c2434
      Reviewed-on: https://go-review.googlesource.com/79581
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAustin Clements <austin@google.com>
      eb97160f
    • Hiroshi Ioka's avatar
      debug/gosym: update docs for changes in Go 1.3 · b23096b5
      Hiroshi Ioka authored
      Change-Id: I850d961e0444f8d34284e994aee183afba35eaa7
      Reviewed-on: https://go-review.googlesource.com/79597Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b23096b5
    • Ilya Tocar's avatar
      crypto/elliptic: reduce allocations on amd64 · 73f284e2
      Ilya Tocar authored
      This is inspired by
      https://blog.cloudflare.com/go-dont-collect-my-garbage/
      This CL adds allocation tracking and parallelizes p256-related benchmarks.
      Amount of allocations can be significantly reduced by marking amd64 asm
      functions as noescape. This exposes a bug in p256MovCond:
      PANDN with memory argument will fault if memory is not aligned, so they
      are replaced with MOVDQU (which is ok with unaligned memory) and
      register version of PANDN.
      
      Results on 88-thread machine (2x 22 cores) below:
      crypto/elliptic:
      name               old time/op    new time/op    delta
      BaseMultP256-88      1.50µs ±11%    1.19µs ± 5%  -20.20%  (p=0.000 n=10+10)
      ScalarMultP256-88    5.47µs ± 5%    3.63µs ±10%  -33.66%  (p=0.000 n=9+10)
      
      name               old alloc/op   new alloc/op   delta
      BaseMultP256-88        800B ± 0%      288B ± 0%  -64.00%  (p=0.000 n=10+10)
      ScalarMultP256-88    2.59kB ± 0%    0.26kB ± 0%  -90.12%  (p=0.000 n=10+10)
      
      name               old allocs/op  new allocs/op  delta
      BaseMultP256-88        13.0 ± 0%       6.0 ± 0%  -53.85%  (p=0.000 n=10+10)
      ScalarMultP256-88      16.0 ± 0%       5.0 ± 0%  -68.75%  (p=0.000 n=10+10)
      
      crypto/ecdsa:
      name              old time/op    new time/op    delta
      SignP256-88         8.63µs ±37%    7.55µs ±38%     ~     (p=0.393 n=10+10)
      VerifyP256-88       13.9µs ± 8%     7.0µs ± 7%  -49.29%  (p=0.000 n=10+9)
      KeyGeneration-88    2.77µs ±11%    2.34µs ±11%  -15.57%  (p=0.000 n=10+10)
      
      name              old alloc/op   new alloc/op   delta
      SignP256-88         4.14kB ± 1%    2.98kB ± 2%  -27.94%  (p=0.000 n=10+10)
      VerifyP256-88       4.47kB ± 0%    0.99kB ± 0%  -77.84%  (p=0.000 n=9+10)
      KeyGeneration-88    1.21kB ± 0%    0.69kB ± 0%  -42.78%  (p=0.000 n=10+10)
      
      name              old allocs/op  new allocs/op  delta
      SignP256-88           47.0 ± 0%      34.0 ± 0%  -27.66%  (p=0.000 n=10+10)
      VerifyP256-88         38.0 ± 0%      17.0 ± 0%  -55.26%  (p=0.000 n=10+10)
      KeyGeneration-88      20.0 ± 0%      13.0 ± 0%  -35.00%  (p=0.000 n=10+10)
      
      On machine with only 4 cores, results are much less impressive:
      around 2% performance gain.
      
      Change-Id: I8a2f8168f83d27ad9ace1b4b1a1e11cb83edf717
      Reviewed-on: https://go-review.googlesource.com/80757
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      73f284e2
    • Ilya Tocar's avatar
      math: remove asm version of Dim · 19928933
      Ilya Tocar authored
      Dim performance has regressed by 14% vs 1.9 on amd64.
      Current pure go version of Dim is faster and,
      what is even more important for performance, is inlinable, so
      instead of tweaking asm implementation, just remove it.
      I had to update BenchmarkDim, because it was simply reloading
      constant(answer) in a loop.
      Perf data below:
      
      name   old time/op  new time/op  delta
      Dim-6  6.79ns ± 0%  1.60ns ± 1%  -76.39%  (p=0.000 n=7+10)
      
      If I modify benchmark to be the same as in this CL results are even better:
      
      name   old time/op  new time/op  delta
      Dim-6  10.2ns ± 0%   1.6ns ± 1%  -84.27%  (p=0.000 n=8+10)
      
      Updates #21913
      
      Change-Id: I00e23c8affc293531e1d9f0e0e49f3a525634f53
      Reviewed-on: https://go-review.googlesource.com/80695
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      19928933
    • Austin Clements's avatar
      runtime: more specific reason for skipping GDB tests on NetBSD · fa81d613
      Austin Clements authored
      Updates #22893.
      
      Change-Id: I2cf5efb4fa6b77aaf82de5d8877c99f9aa5d519a
      Reviewed-on: https://go-review.googlesource.com/81195
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      fa81d613
    • Alberto Donizetti's avatar
      math/big: protect against aliasing in nat.divLarge · ff534e21
      Alberto Donizetti authored
      In nat.divLarge (having signature (z nat).divLarge(u, uIn, v nat)),
      we check whether z aliases uIn or v, but aliasing is currently not
      checked for the u parameter.
      
      Unfortunately, z and u aliasing each other can in some cases cause
      errors in the computation.
      
      The q return parameter (which will hold the result's quotient), is
      unconditionally initialized as
      
          q = z.make(m + 1)
      
      When cap(z) ≥ m+1, z.make() will reuse z's backing array, causing q
      and z to share the same backing array. If then z aliases u, setting q
      during the quotient computation will then corrupt u, which at that
      point already holds computation state.
      
      To fix this, we add an alias(z, u) check at the beginning of the
      function, taking care of aliasing the same way we already do for uIn
      and v.
      
      Fixes #22830
      
      Change-Id: I3ab81120d5af6db7772a062bb1dfc011de91f7ad
      Reviewed-on: https://go-review.googlesource.com/78995
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      ff534e21
    • Hana (Hyang-Ah) Kim's avatar
      cmd/trace: compute pprof-style output per goroutine type · 5bd66e5e
      Hana (Hyang-Ah) Kim authored
      The trace command computes IO, Schedule, Block, and Syscall profiles
      by following the unblocking links in the execution trace and summing
      up the duration.  This change offers variations of those profiles
      that include only selected goroutine types. The id parameter takes the
      goroutine type - i.e. pc of the goroutine.
      
      The output is available from the /goroutine view. So, users can see
      where the goroutines of interest typically block.
      
      Also, these profiles are available for download so users can use
      pprof or other tools to interpret the output. This change adds links
      for download of global profile in the main page.
      
      Change-Id: I35699252056d164e60de282b0406caf96d629c85
      Reviewed-on: https://go-review.googlesource.com/75710Reviewed-by: 's avatarSameer Ajmani <sameer@golang.org>
      5bd66e5e
    • Vladimir Stefanovic's avatar
      cmd/compile: use soft-float routines for soft-float targets · 6be1c09e
      Vladimir Stefanovic authored
      Updates #18162 (mostly fixes)
      
      Change-Id: I35bcb8a688bdaa432adb0ddbb73a2f7adda47b9e
      Reviewed-on: https://go-review.googlesource.com/37958
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
      6be1c09e