1. 02 Oct, 2019 1 commit
  2. 01 Oct, 2019 12 commits
    • Bryan C. Mills's avatar
      internal/goversion: update to 1.14 · a1b0af99
      Bryan C. Mills authored
      In #33848, we propose to use 'go 1.14' in the go.mod file to enable
      new default behavior. That means that 'go mod init' needs to start
      generating that directive by default, which requires the presence of
      the updated version tag in the build environment.
      
      Updates #33848
      
      Change-Id: I9f3b8845fdfd843fd76de32f4b55d8f765d691de
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198318
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
      a1b0af99
    • Ariel Mashraki's avatar
      text/template/parse: remove duplication in peekNonSpace · 93a79bbc
      Ariel Mashraki authored
      nextNonSpace has an identical code except the call to
      backup at the end.
      
      Change-Id: Iefa5b13950007da38323a800fb6b0ce3d436254b
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198277
      Run-TryBot: Rob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      93a79bbc
    • Ariel Mashraki's avatar
      text/template/parse: use strings.Builder in Chain and List nodes · 86cd6c2e
      Ariel Mashraki authored
      This CL is a continuation of 198078. Benchmark output:
      
      benchmark                     old ns/op     new ns/op     delta
      BenchmarkParseLarge-8         24759165      24516563      -0.98%
      BenchmarkVariableString-8     115           115           +0.00%
      BenchmarkListString-8         924           680           -26.41%
      
      benchmark                     old allocs     new allocs     delta
      BenchmarkVariableString-8     3              3              +0.00%
      BenchmarkListString-8         14             13             -7.14%
      
      benchmark                     old bytes     new bytes     delta
      BenchmarkVariableString-8     72            72            +0.00%
      BenchmarkListString-8         512           424           -17.19%
      
      Change-Id: I9ec48fe4832437c556a5fa94d4cbf6e29e28d944
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198080Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      86cd6c2e
    • Clément Chigot's avatar
      cmd/internal/obj/ppc64: Fix ADUFFxxxx generation on aix/ppc64 · 09c9bced
      Clément Chigot authored
      ADUFFCOPY and ADUFFZERO instructions weren't handled by rewriteToUseTOC.
      These instructions are considered as a simple branch except with -dynlink
      where they become an indirect call.
      
      Fixes #34604
      
      Change-Id: I16ca6a152164966fb9cbf792219a8a39aad2b53b
      Reviewed-on: https://go-review.googlesource.com/c/go/+/197842Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      09c9bced
    • Nuno Cruces's avatar
      net/http: avoid sending unspecified time for directories · a49067aa
      Nuno Cruces authored
      Change applies to sendFile.
      This is already done for sendContent.
      
      Change-Id: If43d9ab99e6e66a1363b08e0bdcceb57df1f855c
      GitHub-Last-Rev: 1c47620a09a6f5e2b3d777fadaad6e0189de4af5
      GitHub-Pull-Request: golang/go#34631
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198139Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a49067aa
    • Andrew Bonventre's avatar
      Revert "cmd/link: load symbols from .syso in external link mode" · 1820cca7
      Andrew Bonventre authored
      This reverts CL 186417.
      
      Reason for revert: Broke darwin (10_14), linux (ppc), aix (ppc)
      
      Updates #33139
      
      Change-Id: I8bf3c817a96a0e57e45754a097cea7062b2fcdfd
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198177
      Run-TryBot: Andrew Bonventre <andybons@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      1820cca7
    • Alex Brainman's avatar
      cmd/link: MapViewOfFile output file · af880809
      Alex Brainman authored
      CL 170738 used mmap for writing most of the output file content.
      
      This change implements similar functionality for Windows.
      
      The output of
      
      compilebench -count=5
      
      command before and after this change
      
      name                      old time/op       new time/op       delta
      Template                        254ms ±14%        239ms ±10%    ~     (p=0.222 n=5+5)
      Unicode                         119ms ±14%        113ms ±12%    ~     (p=0.421 n=5+5)
      GoTypes                         892ms ±23%        850ms ± 1%    ~     (p=0.841 n=5+5)
      Compiler                        3.86s ± 2%        3.82s ± 1%    ~     (p=0.222 n=5+5)
      SSA                             12.6s ± 1%        12.6s ± 1%    ~     (p=0.095 n=5+5)
      Flate                           162ms ±18%        149ms ± 1%  -7.91%  (p=0.016 n=5+5)
      GoParser                        199ms ±12%        184ms ± 1%    ~     (p=0.056 n=5+5)
      Reflect                         524ms ±13%        507ms ± 3%    ~     (p=0.421 n=5+5)
      Tar                             207ms ± 7%        198ms ± 0%  -4.58%  (p=0.016 n=5+4)
      XML                             305ms ± 6%        299ms ± 5%    ~     (p=0.690 n=5+5)
      LinkCompiler                    1.14s ±11%        1.14s ± 3%    ~     (p=0.222 n=5+5)
      ExternalLinkCompiler            2.80s ± 5%        2.92s ±13%    ~     (p=0.222 n=5+5)
      LinkWithoutDebugCompiler        727ms ± 2%        750ms ± 7%    ~     (p=0.151 n=5+5)
      StdCmd                          44.0s ± 8%        43.3s ± 2%    ~     (p=1.000 n=5+5)
      
      name                      old user-time/op  new user-time/op  delta
      Template                        300ms ±27%        259ms ±34%    ~     (p=0.341 n=5+5)
      Unicode                         134ms ±51%        144ms ±67%    ~     (p=0.548 n=5+5)
      GoTypes                         1.05s ±10%        1.03s ± 6%    ~     (p=0.968 n=5+5)
      Compiler                        5.01s ± 3%        4.88s ± 3%    ~     (p=0.286 n=5+5)
      SSA                             16.8s ± 1%        16.7s ± 1%  -0.95%  (p=0.008 n=5+5)
      Flate                           178ms ±67%        181ms ±38%    ~     (p=0.849 n=5+5)
      GoParser                        231ms ±32%        219ms ±21%    ~     (p=0.810 n=5+5)
      Reflect                         634ms ±33%        650ms ± 6%    ~     (p=0.135 n=5+5)
      Tar                             219ms ±36%        231ms ±19%    ~     (p=0.905 n=5+5)
      XML                             378ms ±20%        366ms ±23%    ~     (p=0.913 n=5+5)
      LinkCompiler                    1.34s ±15%        1.32s ±10%    ~     (p=0.730 n=5+5)
      ExternalLinkCompiler            1.22s ±13%        1.18s ±15%    ~     (p=0.873 n=5+5)
      LinkWithoutDebugCompiler        847ms ±13%        841ms ±21%    ~     (p=0.667 n=5+5)
      
      name                      old text-bytes    new text-bytes    delta
      HelloSize                       767kB ± 0%        767kB ± 0%    ~     (all equal)
      CmdGoSize                      10.6MB ± 0%       10.6MB ± 0%    ~     (all equal)
      
      name                      old data-bytes    new data-bytes    delta
      HelloSize                      10.1kB ± 0%       10.1kB ± 0%    ~     (all equal)
      CmdGoSize                       310kB ± 0%        310kB ± 0%    ~     (all equal)
      
      name                      old bss-bytes     new bss-bytes     delta
      HelloSize                       0.00B             0.00B         ~     (all equal)
      CmdGoSize                       0.00B             0.00B         ~     (all equal)
      
      name                      old exe-bytes     new exe-bytes     delta
      HelloSize                      1.10MB ± 0%       1.10MB ± 0%    ~     (all equal)
      CmdGoSize                      14.7MB ± 0%       14.7MB ± 0%    ~     (all equal)
      
      Change-Id: I653f63213b9cc8a4b05f71938e34b5d53b05e3f5
      Reviewed-on: https://go-review.googlesource.com/c/go/+/196846
      Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      af880809
    • Ariel Mashraki's avatar
      text/template/parse: use strings.Builder in String methods · 4f13a9c5
      Ariel Mashraki authored
      As mentioned in godoc, strings.Builder is more efficient for
      concatenating and building strings.
      Running a simple bench test on VariableNode.String() gives:
      
      benchmark                     old ns/op     new ns/op     delta
      BenchmarkParseLarge-8         25676831      24453285      -4.77%
      BenchmarkVariableString-8     296           115           -61.15%
      
      benchmark                     old allocs     new allocs     delta
      BenchmarkVariableString-8     8              3              -62.50%
      
      benchmark                     old bytes     new bytes     delta
      BenchmarkVariableString-8     112           72            -35.71%
      
      Change-Id: I13c9340080738fcad1edeed859d33ba608e4b05a
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198078Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      4f13a9c5
    • Shenghou Ma's avatar
      runtime: fix darwin syscall performance regression · c1635ad8
      Shenghou Ma authored
      While understanding why syscall.Read is 2x slower on darwin/amd64, I found
      out that, contrary to popular belief, the slowdown is not due to the migration
      to use libSystem.dylib instead of direct SYSCALLs, i.e., CL 141639 (and #17490),
      but due to a subtle change introduced in CL 141639.
      
      Previously, syscall.Read used syscall.Syscall(SYS_READ), whose preamble called
      runtime.entersyscall, but after CL 141639, syscall.Read changes to call
      runtime.syscall_syscall instead, which in turn calls runtime.entersyscallblock
      instead of runtime.entersyscall. And the entire 2x slow down can be attributed
      to this change.
      
      I think this is unnecessary as even though syscalls like Read might block, it
      does not always block, so there is no need to handoff P proactively for each
      Read. Additionally, we have been fine with not handing off P for each Read
      prior to Go 1.12, so we probably don't need to change it. This changes restores
      the pre-Go 1.12 behavior, where syscall preamble uses runtime.entersyscall,
      and we rely on sysmon to take P back from g blocked in syscalls.
      
      Change-Id: If76e97b5a7040cf1c10380a567c4f5baec3121ba
      Reviewed-on: https://go-review.googlesource.com/c/go/+/197938
      Run-TryBot: Minux Ma <minux@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      c1635ad8
    • Andrew Bonventre's avatar
      cmd/go/internal/modfetch: update TestCodeRepo for gopkg.in/yaml.v2 · e617141b
      Andrew Bonventre authored
      The new yaml.v2 release broke the longtest builder. Update the expected
      data.
      
      Updates #28856
      
      Change-Id: I98ec9e32e55bdb6b26b67e46dc16f34f77c2d40f
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198117Reviewed-by: default avatarDmitri Shuralyov <dmitshur@golang.org>
      e617141b
    • John Papandriopoulos's avatar
      cmd/link: load symbols from .syso in external link mode · 5e514b76
      John Papandriopoulos authored
      Fix linking with a package having a .syso file in external link mode,
      that would otherwise cause an error before executing the external
      linker because it can't find symbols that are exported in the said
      .syso file.
      
      Fixes #33139
      
      Change-Id: Id3ee737fba1c6f1e37910593dfedf9c84486d398
      Reviewed-on: https://go-review.googlesource.com/c/go/+/186417Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      5e514b76
    • Rob Pike's avatar
      text/template: further simplify building the vars list · 27cf81e1
      Rob Pike authored
      Followup to https://golang.org/cl/197997
      
      If you know the number of elements, you don't need append at all.
      Either use append to grow, or allocate and index. Here we choose
      number 2.
      
      Change-Id: Ic58637231789640ff7b293ece04a95a8de7ccf8f
      Reviewed-on: https://go-review.googlesource.com/c/go/+/198097Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      27cf81e1
  3. 30 Sep, 2019 10 commits
  4. 29 Sep, 2019 3 commits
  5. 28 Sep, 2019 4 commits
  6. 27 Sep, 2019 10 commits