1. 11 May, 2018 3 commits
    • Elias Naur's avatar
      misc/ios: forward SIGQUIT to the iOS program · 4122319e
      Elias Naur authored
      When running tests that fails to complete within the test timeout,
      the go tool sends the test program a SIGQUIT signal to print
      backtraces. However, for tests running with an exec wrapper, the
      resulting backtraces will come from the exec wrapper process and
      not the test program.
      
      Change the iOS exec wrapper to forward SIGQUIT signals to the lldb
      python driver and change the driver to forward the signals to the
      running test on the device.
      
      Before:
      
      $ GOARCH=arm64 go test forever_test.go
      lldb: running program
      SIGQUIT: quit
      PC=0x10816fe m=0 sigcode=0
      
      goroutine 54 [syscall]:
      syscall.Syscall6(0x7, 0x16ab, 0xc000033dfc, 0x0, 0xc000116f30, 0x0, 0x0, 0xc000116f30, 0x0, 0x1328820)
      	/Users/elias/go-tip/src/syscall/asm_darwin_amd64.s:41 +0x5 fp=0xc000033d48 sp=0xc000033d40 pc=0x10816d5
      syscall.wait4(0x16ab, 0xc000033dfc, 0x0, 0xc000116f30, 0x90, 0x1200e00, 0x1)
      	/Users/elias/go-tip/src/syscall/zsyscall_darwin_amd64.go:34 +0x7b fp=0xc000033dc0 sp=0xc000033d48 pc=0x107e4eb
      syscall.Wait4(0x16ab, 0xc000033e4c, 0x0, 0xc000116f30, 0xc0000fd518, 0x0, 0x0)
      	/Users/elias/go-tip/src/syscall/syscall_bsd.go:129 +0x51 fp=0xc000033e10 sp=0xc000033dc0 pc=0x107b7b1
      os.(*Process).wait(0xc00008d440, 0x1095e2e, 0xc0000fd518, 0x0)
      	/Users/elias/go-tip/src/os/exec_unix.go:38 +0x7b fp=0xc000033e80 sp=0xc000033e10 pc=0x109af2b
      os.(*Process).Wait(0xc00008d440, 0xc000033fb0, 0x10, 0x11d1f00)
      	/Users/elias/go-tip/src/os/exec.go:125 +0x2b fp=0xc000033eb0 sp=0xc000033e80 pc=0x109a47b
      os/exec.(*Cmd).Wait(0xc0000b1ce0, 0xc000033f90, 0x11394df)
      	/Users/elias/go-tip/src/os/exec/exec.go:463 +0x5b fp=0xc000033f28 sp=0xc000033eb0 pc=0x1136f0b
      main.startDebugBridge.func1(0xc0000b1ce0, 0xc0000b8ae0, 0xc0000e2a80)
      	/Users/elias/go-tip/misc/ios/go_darwin_arm_exec.go:314 +0x40 fp=0xc000033fc8 sp=0xc000033f28 pc=0x11a1980
      runtime.goexit()
      	/Users/elias/go-tip/src/runtime/asm_amd64.s:1360 +0x1 fp=0xc000033fd0 sp=0xc000033fc8 pc=0x10565a1
      created by main.startDebugBridge
      	/Users/elias/go-tip/misc/ios/go_darwin_arm_exec.go:313 +0x15f
      
      ...
      
      After:
      
      $ GOARCH=arm64 go test forever_test.go
      lldb: running program
      === RUN   TestForever
      SIGQUIT: quit
      PC=0x100144e24 m=0 sigcode=0
      
      ...
      
      goroutine 19 [select (no cases)]:
      command-line-arguments.TestForever(0x1300b60f0)
      	/Users/elias/go-tip/src/forever_test.go:6 +0x18
      testing.tRunner(0x1300b60f0, 0x100211aa0)
      	/Users/elias/go-tip/src/testing/testing.go:795 +0xa8
      created by testing.(*T).Run
      	/Users/elias/go-tip/src/testing/testing.go:840 +0x22c
      
      ...
      
      Change-Id: I6b3cf1662d07a43ade0530842733b0944bee1ace
      Reviewed-on: https://go-review.googlesource.com/112676
      Run-TryBot: Elias Naur <elias.naur@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
      4122319e
    • Daniel Theophanes's avatar
      database/sql: add additional Stats to DBStats · d89ea410
      Daniel Theophanes authored
      Provide better statistics for the database pool. Add counters
      for waiting on the pool and closes. Too much waiting or too many
      connection closes could indicate a problem.
      
      Fixes #24683
      Fixes #22138
      
      Change-Id: I9e1e32a0487edf41c566b8d9c07cb55e04078fec
      Reviewed-on: https://go-review.googlesource.com/108536
      Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d89ea410
    • quasilyte's avatar
      cmd/internal/obj/x86: use named consts for movtab Z-cases · e405c9cc
      quasilyte authored
      Use 0-terminated opbyte sequences for Zlit-like movtabs instead of E=0xff.
      
      movCodeFullPtr is unused (load full ptr is unsupported), but it should
      be removed in a separate CL (if removed at all).
      
      Passes toolstash-check.
      
      Change-Id: I28436718d93b017153de0e50e3bcec344ea4ee05
      Reviewed-on: https://go-review.googlesource.com/107076
      Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      e405c9cc
  2. 10 May, 2018 14 commits
  3. 09 May, 2018 16 commits
  4. 08 May, 2018 7 commits
    • Matt Juran's avatar
      test: fast GC+concurrency+types verification · e0adc35c
      Matt Juran authored
      This test runs independent goroutines modifying a comprehensive variety
      of local vars to look for garbage collector regressions. This test has
      been verified to trigger issue 22781 on the go1.9.2 tag. This test
      expands on test/fixedbugs/issue22781.go.
      
      Tests #22781
      
      Change-Id: Id32f8dde7ef650aea1b1b4cf518e6d045537bfdc
      Reviewed-on: https://go-review.googlesource.com/93715
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      e0adc35c
    • Martin Möhrmann's avatar
      cmd/compile: optimize map-clearing range idiom · aee71dd7
      Martin Möhrmann authored
      replace map clears of the form:
      
              for k := range m {
                      delete(m, k)
              }
      
      (where m is map with key type that is reflexive for ==)
      with a new runtime function that clears the maps backing
      array with a memclr and reinitializes the hmap struct.
      
      Map key types that for example contain floats are not
      replaced by this optimization since NaN keys cannot
      be deleted from maps using delete.
      
      name                           old time/op  new time/op  delta
      GoMapClear/Reflexive/1         92.2ns ± 1%  47.1ns ± 2%  -48.89%  (p=0.000 n=9+9)
      GoMapClear/Reflexive/10         108ns ± 1%    48ns ± 2%  -55.68%  (p=0.000 n=10+10)
      GoMapClear/Reflexive/100        303ns ± 2%   110ns ± 3%  -63.56%  (p=0.000 n=10+10)
      GoMapClear/Reflexive/1000      3.58µs ± 3%  1.23µs ± 2%  -65.49%  (p=0.000 n=9+10)
      GoMapClear/Reflexive/10000     28.2µs ± 3%  10.3µs ± 2%  -63.55%  (p=0.000 n=9+10)
      GoMapClear/NonReflexive/1       121ns ± 2%   124ns ± 7%     ~     (p=0.097 n=10+10)
      GoMapClear/NonReflexive/10      137ns ± 2%   139ns ± 3%   +1.53%  (p=0.033 n=10+10)
      GoMapClear/NonReflexive/100     331ns ± 3%   334ns ± 2%     ~     (p=0.342 n=10+10)
      GoMapClear/NonReflexive/1000   3.64µs ± 3%  3.64µs ± 2%     ~     (p=0.887 n=9+10)
      GoMapClear/NonReflexive/10000  28.1µs ± 2%  28.4µs ± 3%     ~     (p=0.247 n=10+10)
      
      Fixes #20138
      
      Change-Id: I181332a8ef434a4f0d89659f492d8711db3f3213
      Reviewed-on: https://go-review.googlesource.com/110055Reviewed-by: default avatarKeith Randall <khr@golang.org>
      aee71dd7
    • Rob Pike's avatar
      doc/faq: tidy up a couple of nits · cd1976db
      Rob Pike authored
      The phrase "couple X" is considered colloquial, so make that "a couple of X".
      Also move the start of a sentence to a new line in a couple of places
      for easier editing, in one place thereby removing two spaces after a period.
      
      Change-Id: If5ef05eb496afc235f8f0134c4e7346375a65181
      Reviewed-on: https://go-review.googlesource.com/112176Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      cd1976db
    • Hana (Hyang-Ah) Kim's avatar
      cmd/trace: handle invalid goid para in /trace · 43b18f42
      Hana (Hyang-Ah) Kim authored
      Change-Id: I1cb7c8b70a5ae16386f6abb577c23d821f7ff7f0
      Reviewed-on: https://go-review.googlesource.com/112197Reviewed-by: default avatarPeter Weinberger <pjw@google.com>
      Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
      43b18f42
    • Hana (Hyang-Ah) Kim's avatar
      cmd/trace: skip links for buckets with 0 count · 9eface70
      Hana (Hyang-Ah) Kim authored
      Change-Id: Ib1c2f7cc8e8f631ed9e74161699332f492d4cb0d
      Reviewed-on: https://go-review.googlesource.com/112196Reviewed-by: default avatarPeter Weinberger <pjw@google.com>
      9eface70
    • jimmyfrasche's avatar
      doc: make front page video respond to layout changes (1/2) · d96221f2
      jimmyfrasche authored
      The videos on the front page are always the same width, regardless of
      the viewport width. These changes let the video fill the space given
      to its container regardless of layout. It uses the standard hack for
      making iframes responsive, but the videos are loaded at random and do
      not have uniform aspect ratios so that information is injected into the
      DOM using custom properties. If these are not supported, it falls back
      to the same layout present before this change.
      
      Note: this change also requires CL 108678 to complete the fix,
      though either CL without the other is harmless.
      
      Updates #24997.
      
      Change-Id: I2f93dc21ffe01d99ce0e175e9dd0e3d486fddc9f
      Reviewed-on: https://go-review.googlesource.com/108677
      Run-TryBot: Andrew Bonventre <andybons@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
      d96221f2
    • Keith Randall's avatar
      cmd/compile: rename memory-using operations · f3234866
      Keith Randall authored
      Some *mem ops are loads, some are stores, some are modifications.
      Replace mem->load for the loads.
      Replace mem->store for the stores.
      Replace mem->modify for the load-modify-stores.
      
      The only semantic change in this CL is to mark
      ADD(Q|L)constmodify (which used to be ADD(Q|L)constmem) as
      both a read and a write, instead of just a write. This is arguably
      a bug fix, but the bug isn't triggerable at the moment, see CL 112157.
      
      Change-Id: Iccb45aea817b606adb2d712ff99b10ee28e4616a
      Reviewed-on: https://go-review.googlesource.com/112159
      Run-TryBot: Keith Randall <khr@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f3234866