1. 12 Apr, 2015 15 commits
  2. 11 Apr, 2015 11 commits
  3. 10 Apr, 2015 14 commits
    • Michael Hudson-Doyle's avatar
      debug/gosym: skip tests when .gosymtab section not found · 8bf0ed51
      Michael Hudson-Doyle authored
      Skip the test when there is no .gosymtab section in the executable
      rather than crashing.
      
      Change-Id: Ieb3df07e307f50c33cdafab38f9b5d1ac0e55c04
      Reviewed-on: https://go-review.googlesource.com/5110Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
      8bf0ed51
    • Ian Lance Taylor's avatar
      doc/go1.5.txt: note new options for go, gc, asm, ld · 0eadcc88
      Ian Lance Taylor authored
      Change-Id: I353ff7eb35b066a1a2693c087c9876adac8e3fd0
      Reviewed-on: https://go-review.googlesource.com/8763Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      0eadcc88
    • Shenghou Ma's avatar
      test: add gccgo test case for #10407 · 399b3e32
      Shenghou Ma authored
      Change-Id: I8d17e2b0fbc529ca7958c75222964a5e419aa3db
      Reviewed-on: https://go-review.googlesource.com/8717Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      399b3e32
    • Derek Buitenhuis's avatar
      runtime: Fix GDB integration with Python 2 · 53840ad6
      Derek Buitenhuis authored
      A similar fix was applied in 54568685
      but another instance of 'pc' was missed.
      
      Also adds a test for the goroutine gdb command.
      
      It currently uses goroutine 2 for the test, since goroutine 1 has
      its stack pointer set to 0 for some reason.
      
      Change-Id: I53ca22be6952f03a862edbdebd9b5c292e0853ae
      Reviewed-on: https://go-review.googlesource.com/8729
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      53840ad6
    • Rob Pike's avatar
      doc/go1.5.txt: time.AppendFormat · 49a5a97e
      Rob Pike authored
      Change-Id: I9e8a0dc152ef9403ff5ece0c161bda3a2f4448a8
      Reviewed-on: https://go-review.googlesource.com/8760Reviewed-by: 's avatarRob Pike <r@golang.org>
      49a5a97e
    • Caleb Spare's avatar
      time: add Time.AppendFormat · 35bda67d
      Caleb Spare authored
      This is a version of Time.Format that doesn't require allocation.
      
      This is an updated version of 0af302f5
      submitted by @bradfitz which was later rolled back.
      
      Fixes #5192
      Updates #5195
      
      Change-Id: I4e6255bee1cf3914a6cc8d9d2a881cfeb273c08e
      Reviewed-on: https://go-review.googlesource.com/1760Reviewed-by: 's avatarRob Pike <r@golang.org>
      35bda67d
    • Dmitry Vyukov's avatar
      cmd/gc: fix handling of OGETG in race mode · 08c43488
      Dmitry Vyukov authored
      Now that getg is an intrinsic, more runtime functions
      gets inlined (in particular, LockOSThread).
      Runtime code gets race instrumented after inlining into
      other packages. This can lead to false positives,
      as race detector ignores all internal synchronization in runtime.
      Inling of LockOSThread lead to false race reports on m contents.
      See the issue for an example.
      
      Fixes #10380
      
      Change-Id: Ic9b760b53c28c2350bc54a5d4677fcd1c1f86e5f
      Reviewed-on: https://go-review.googlesource.com/8690Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      08c43488
    • Austin Clements's avatar
      runtime: start concurrent GC promptly when we reach its trigger · 4b956ae3
      Austin Clements authored
      Currently, when allocation reaches the concurrent GC trigger size, we
      start the concurrent collector by ready'ing its G. This simply puts it
      on the end of the P's run queue, which means we may not actually start
      GC for some time as the current G continues to run and then the P
      drains other Gs already on its run queue. Since the mutator can
      continue to allocate, the heap can potentially be much larger than we
      intended by the time GC actually starts. Furthermore, how much larger
      is difficult to predict since it depends on the scheduler.
      
      Fix this by preempting the current G and switching directly to the
      concurrent GC G as soon as we reach the trigger heap size.
      
      On the garbage benchmark from the benchmarks subrepo with
      GOMAXPROCS=4, this reduces the time from triggering the GC to the
      beginning of sweep termination by 10 to 30 milliseconds, which reduces
      allocation after the trigger by up to 10MB (a large fraction of the
      64MB live heap the benchmark tries to maintain).
      
      One other known source of delay before we "really" start GC is the
      sweep finalization performed before sweep termination. This has
      similar negative effects on heap size and predictability, but is an
      orthogonal problem. This change adds a TODO for this.
      
      Change-Id: I8bae98cb43685c1bf353ff55868e4647e3743c47
      Reviewed-on: https://go-review.googlesource.com/8513Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      4b956ae3
    • Austin Clements's avatar
      runtime: remove GoSched/GoStart trace events around GC · 6afb5fa4
      Austin Clements authored
      These were appropriate for STW GC, since it interrupted the allocating
      Goroutine, but don't apply to concurrent GC, which runs on its own
      Goroutine. Forced GC is still STW, but it makes sense to attribute the
      GC to the goroutine that called runtime.GC().
      
      Change-Id: If12418ca66dc7e53b8b16025af4e03adb5d9577e
      Reviewed-on: https://go-review.googlesource.com/8715Reviewed-by: 's avatarDmitry Vyukov <dvyukov@google.com>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      6afb5fa4
    • Austin Clements's avatar
      internal/trace: don't assume GC will start and end on same P · eec6fdc9
      Austin Clements authored
      Currently, GC disables preemption between the traceGCStart and
      traceGCDone, so it never moves Ps. Consequently, the trace verifier
      attaches information about GC to its per-P state and will fail if GC
      starts on one P and ends on another.
      
      GC will soon be preemptible and may end on a different P than it
      began. Hence, this change lifts this per-P verifier state to global
      state.
      
      Change-Id: I82256e2baab1ff3c4453fec312079018423b4b51
      Reviewed-on: https://go-review.googlesource.com/8714Reviewed-by: 's avatarDmitry Vyukov <dvyukov@google.com>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      eec6fdc9
    • Austin Clements's avatar
      runtime: make test for freezetheworld more precise · 7c372496
      Austin Clements authored
      exitsyscallfast checks for freezetheworld, but does so only by
      checking if stopwait is positive. This can also happen during
      stoptheworld, which is harmless, but confusing. Shortly, it will be
      important that we get to the p.status cas even if stopwait is set.
      
      Hence, make this test more specific so it only triggers with
      freezetheworld and not other uses of stopwait.
      
      Change-Id: Ibb722cd8360c3ed5a9654482519e3ceb87a8274d
      Reviewed-on: https://go-review.googlesource.com/8205Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      7c372496
    • Austin Clements's avatar
      debug/dwarf: document DWARF class -> Go type mapping · 253ad67b
      Austin Clements authored
      Currently, the only way to know the Go type of an attribute of some
      DWARF attribute class was to read the dwarf package code (or
      experiment).  This makes it hard to go from the DWARF specification to
      writing code that uses the dwarf package.
      
      Fix this by adding a table to the documentation comment of the Field
      type that gives the correspondence between DWARF attribute classes and
      Go types.
      
      Change-Id: I57c678a551fa1eb46f8207085d5a53d44985e3e7
      Reviewed-on: https://go-review.googlesource.com/7280Reviewed-by: 's avatarRob Pike <r@golang.org>
      Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
      253ad67b
    • Robert Griesemer's avatar
      strconv: use 64bit uint for decimal conversion if available · faa9d1ec
      Robert Griesemer authored
      The existing code used ints for the (slow) decimal conversion and
      assumed that they were 32bit wide.
      
      This change uses uints and the appropriate width (32 or 64bit)
      depending on platform.
      
      The performance difference is in the noise for the usual (optimized)
      case which does not use the slow path conversion:
      
      benchmark                               old ns/op     new ns/op     delta
      BenchmarkFormatFloatDecimal             298           299           +0.34%
      BenchmarkFormatFloat                    388           392           +1.03%
      BenchmarkFormatFloatExp                 365           364           -0.27%
      BenchmarkFormatFloatNegExp              364           362           -0.55%
      BenchmarkFormatFloatBig                 482           476           -1.24%
      BenchmarkAppendFloatDecimal             100           102           +2.00%
      BenchmarkAppendFloat                    199           201           +1.01%
      BenchmarkAppendFloatExp                 174           175           +0.57%
      BenchmarkAppendFloatNegExp              169           174           +2.96%
      BenchmarkAppendFloatBig                 286           286           +0.00%
      BenchmarkAppendFloat32Integer           99.9          102           +2.10%
      BenchmarkAppendFloat32ExactFraction     161           164           +1.86%
      BenchmarkAppendFloat32Point             199           201           +1.01%
      BenchmarkAppendFloat32Exp               167           168           +0.60%
      BenchmarkAppendFloat32NegExp            163           169           +3.68%
      BenchmarkAppendFloat64Fixed1            137           134           -2.19%
      BenchmarkAppendFloat64Fixed2            144           146           +1.39%
      BenchmarkAppendFloat64Fixed3            138           140           +1.45%
      BenchmarkAppendFloat64Fixed4            144           145           +0.69%
      
      The performance difference is significant if the fast path conversion is
      explicitly turned off (ftoa.go:101):
      
      benchmark                               old ns/op     new ns/op     delta
      BenchmarkFormatFloatDecimal             459           427           -6.97%
      BenchmarkFormatFloat                    1560          1180          -24.36%
      BenchmarkFormatFloatExp                 5501          3128          -43.14%
      BenchmarkFormatFloatNegExp              24085         14360         -40.38%
      BenchmarkFormatFloatBig                 1409          1081          -23.28%
      BenchmarkAppendFloatDecimal             248           226           -8.87%
      BenchmarkAppendFloat                    1315          982           -25.32%
      BenchmarkAppendFloatExp                 5274          2869          -45.60%
      BenchmarkAppendFloatNegExp              23905         14054         -41.21%
      BenchmarkAppendFloatBig                 1194          860           -27.97%
      BenchmarkAppendFloat32Integer           167           175           +4.79%
      BenchmarkAppendFloat32ExactFraction     182           184           +1.10%
      BenchmarkAppendFloat32Point             556           564           +1.44%
      BenchmarkAppendFloat32Exp               1134          918           -19.05%
      BenchmarkAppendFloat32NegExp            2679          1801          -32.77%
      BenchmarkAppendFloat64Fixed1            274           238           -13.14%
      BenchmarkAppendFloat64Fixed2            494           368           -25.51%
      BenchmarkAppendFloat64Fixed3            1833          1008          -45.01%
      BenchmarkAppendFloat64Fixed4            6133          3596          -41.37%
      
      Change-Id: I829b8abcca882b1c10d8ae421d3249597c31f3c9
      Reviewed-on: https://go-review.googlesource.com/3811Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      faa9d1ec
    • Dmitry Vyukov's avatar
      runtime: fix tracing of syscall exit · 089d363a
      Dmitry Vyukov authored
      Fix tracing of syscall exit after:
      https://go-review.googlesource.com/#/c/7504/
      
      Change-Id: Idcde2aa826d2b9a05d0a90a80242b6bfa78846ab
      Reviewed-on: https://go-review.googlesource.com/8728Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      089d363a