1. 05 Apr, 2016 14 commits
  2. 04 Apr, 2016 16 commits
  3. 03 Apr, 2016 10 commits
    • Brad Fitzpatrick's avatar
      cmd/compile: give ChanDir a type · 386c0e65
      Brad Fitzpatrick authored
      Change-Id: I03621db79637b04982e1f0e7b4268c4ed2db6d22
      Reviewed-on: https://go-review.googlesource.com/21484Reviewed-by: default avatarJosh Bleecher Snyder <josharian@gmail.com>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      386c0e65
    • Brad Fitzpatrick's avatar
      cmd/link: simplify readSymName, taking advantage of bufio.Reader · 73edd7b2
      Brad Fitzpatrick authored
      Now that cmd/link uses bufio.Reader, take advantage of it.
      I find this new version easier to reason about.
      
      Reduces allocations by 1.1% when linking a basic HTTP server.
      
      Numbers are stable with each round measuring using:
      rm prof.mem; go tool link -o foo  -memprofile=prof.mem -memprofilerate=1 foo.a
      
      Before:
      
      65.36MB of 74.53MB total (87.70%)
      Dropped 157 nodes (cum <= 0.37MB)
      Showing top 10 nodes out of 39 (cum >= 1.47MB)
            flat  flat%   sum%        cum   cum%
         21.48MB 28.81% 28.81%    21.48MB 28.81%  cmd/link/internal/ld.Linklookup
         16.04MB 21.52% 50.33%    16.04MB 21.52%  cmd/link/internal/ld.(*objReader).readSlices
          4.61MB  6.19% 56.52%     4.61MB  6.19%  cmd/link/internal/ld.(*objReader).readSymName
          4.51MB  6.05% 62.57%     6.32MB  8.48%  cmd/link/internal/ld.writelines
          4.50MB  6.03% 68.60%     4.50MB  6.03%  cmd/link/internal/ld.Symgrow
          4.02MB  5.39% 73.99%     4.02MB  5.39%  cmd/link/internal/ld.linknew
          3.98MB  5.34% 79.33%     3.98MB  5.34%  cmd/link/internal/ld.setaddrplus
          2.96MB  3.97% 83.30%    28.78MB 38.62%  cmd/link/internal/ld.(*objReader).readRef
          1.81MB  2.43% 85.73%     1.81MB  2.43%  cmd/link/internal/ld.newcfaoffsetattr
          1.47MB  1.97% 87.70%     1.47MB  1.97%  cmd/link/internal/ld.(*objReader).readSym
      
      After:
      
      64.66MB of 73.87MB total (87.53%)
      Dropped 156 nodes (cum <= 0.37MB)
      Showing top 10 nodes out of 40 (cum >= 1.47MB)
            flat  flat%   sum%        cum   cum%
         21.48MB 29.08% 29.08%    21.48MB 29.08%  cmd/link/internal/ld.Linklookup
         16.04MB 21.71% 50.79%    16.04MB 21.71%  cmd/link/internal/ld.(*objReader).readSlices
          4.51MB  6.10% 56.90%     6.32MB  8.56%  cmd/link/internal/ld.writelines
          4.50MB  6.09% 62.99%     4.50MB  6.09%  cmd/link/internal/ld.Symgrow
          4.02MB  5.44% 68.42%     4.02MB  5.44%  cmd/link/internal/ld.linknew
          3.98MB  5.38% 73.81%     3.98MB  5.38%  cmd/link/internal/ld.setaddrplus
          3.90MB  5.28% 79.09%     3.90MB  5.28%  cmd/link/internal/ld.(*objReader).readSymName
          2.96MB  4.01% 83.09%    28.08MB 38.01%  cmd/link/internal/ld.(*objReader).readRef
          1.81MB  2.45% 85.55%     1.81MB  2.45%  cmd/link/internal/ld.newcfaoffsetattr
          1.47MB  1.99% 87.53%     1.47MB  1.99%  cmd/link/internal/ld.(*objReader).readSym
      
      Also tested locally with asserts that that the calculated length is
      always correct and thus the adjName buf never reallocates.
      
      Change-Id: I19e3e8bfa6a12bcd8b5216f6232f42c122e4f80e
      Reviewed-on: https://go-review.googlesource.com/21481Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      73edd7b2
    • Michael Hudson-Doyle's avatar
      cmd/link: define a variable for the target platform's elf relocation type · 1934a77f
      Michael Hudson-Doyle authored
      Rather than having half a dozen switch statements. Also remove some c2go dregs.
      
      Change-Id: I19af5b64f73369126020e15421c34cad5bbcfbf8
      Reviewed-on: https://go-review.googlesource.com/21442Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      1934a77f
    • Michael Munday's avatar
      syscall: add support for s390x · af74dca4
      Michael Munday authored
      On s390x char is unsigned. We cannot force it to be signed using
      -fsigned-char (see arm64) because the s390x gccgo API is already
      public and we need to stick as closely as possible to it to avoid
      breaking existing projects. In order to match the gccgo API we
      also force the RawSockaddr.Data and RawSockaddrUnix.Path fields
      to be signed.
      
      This CL adds a post-processing pass (mkpost.go) to mkall.sh in
      order to export the types of fields in PtraceRegs on s390x
      without affecting the API on other platforms. The types of these
      fields match their counterparts in gccgo. mkpost.go also cleans
      up the Pad_cgo* fields and X_* fields (these fields are not
      exported by gccgo currently). It could be extended to add build
      tags on platforms that need them.
      
      Change-Id: I66bdf5b86ec98af70baf666989027bb354df9e3e
      Reviewed-on: https://go-review.googlesource.com/20961Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      af74dca4
    • Shahar Kohanim's avatar
      cmd/link: more idiomatic object reader · fe5be5ac
      Shahar Kohanim authored
      name       old secs    new secs    delta
      LinkCmdGo   0.52 ± 3%   0.52 ± 7%    ~     (p=0.325 n=93+100)
      
      name       old MaxRSS  new MaxRSS  delta
      LinkCmdGo   120k ± 1%   118k ± 4%  -1.10%   (p=0.000 n=87+96)
      
      Change-Id: I967660b8dc6036d28eeea1b6b30f400fadd57b05
      Reviewed-on: https://go-review.googlesource.com/21372
      Run-TryBot: Shahar Kohanim <skohanim@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      fe5be5ac
    • Eric Engestrom's avatar
      all: fix spelling mistakes · 7a8caf7d
      Eric Engestrom authored
      Signed-off-by: default avatarEric Engestrom <eric@engestrom.ch>
      
      Change-Id: I91873aaebf79bdf1c00d38aacc1a1fb8d79656a7
      Reviewed-on: https://go-review.googlesource.com/21433Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7a8caf7d
    • Russ Cox's avatar
      path, path/filepath: add Join example with joined rooted path · 1f7e55e4
      Russ Cox authored
      This makes clear that Go's path.Join and filepath.Join are different
      from the Python os.path.join (and perhaps others).
      
      Requested in private mail.
      
      Change-Id: Ie5dfad8a57f9baa5cca31246af1fd4dd5b1a64ee
      Reviewed-on: https://go-review.googlesource.com/20711Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      1f7e55e4
    • Michael Munday's avatar
      cmd/link/internal/s390x: add s390x support · 29a6149e
      Michael Munday authored
      Supports basic internal linking, external linking and shared library
      linking.
      
      Change-Id: Ic9693dd94df561b0f9df9880009b1e8ab9d59b92
      Reviewed-on: https://go-review.googlesource.com/20879
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      29a6149e
    • Brad Fitzpatrick's avatar
      os: make IsExists also recognize syscall.ENOTEMPTY · 7c15b2ab
      Brad Fitzpatrick authored
      And adds missing tests.
      
      Fixes #14970
      
      Change-Id: I0dba02603bc245f555498cb5dd3e0a9d87c52353
      Reviewed-on: https://go-review.googlesource.com/21467Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7c15b2ab
    • Brad Fitzpatrick's avatar
      fmt: hold on to all free buffers, regardless of size · 0656da91
      Brad Fitzpatrick authored
      This code made sense before fmt switched to using sync.Pool, but a
      sync.Pool clears all items on GC, so not reusing something based on
      size is just a waste of memory.
      
      Change-Id: I201312b0ee6c572ff3c0ffaf71e42623a160d23f
      Reviewed-on: https://go-review.googlesource.com/21480Reviewed-by: default avatarRob Pike <r@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      0656da91