1. 09 May, 2019 4 commits
    • Than McIntosh's avatar
      cmd/link: fix link time regression in object file reading · 0793c810
      Than McIntosh authored
      In CL 173938, the linker's object file reader was switched over to
      selectively create strings backed with read-only mmap'd memory.
      In the process a call to r.rd.Offset() was added to readSymName(),
      which greatly increased the number of system calls (Offset does a
      seek system call).
      
      This patch changes the object file reader so that all reads are done
      directly from the mmap'd data if it is present, and adds logic to keep
      track of the offset within the rodata consumed so far. Doing this gets
      rid of the calls to r.rd.Offset() and the corresponding seek system
      calls.
      
      Also as part of this change, hoist the calls to objabi.PathToPrefix
      up into the initial setup code for object reading, and store the
      result in the reader (since objabi.PathToPrefix was also coming up
      as hot in the profile).
      
      Numbers for this change from compilebench:
      
      benchmark                 old ns/op       new ns/op       delta
      BenchmarkTemplate         172053975       170357597       -0.99%
      BenchmarkUnicode          64564850        64333653        -0.36%
      BenchmarkGoTypes          627931042       628043673       +0.02%
      BenchmarkCompiler         2982468893      2924575043      -1.94%
      BenchmarkSSA              9701681721      9799342557      +1.01%
      BenchmarkFlate            106847240       107509414       +0.62%
      BenchmarkGoParser         132082319       130734905       -1.02%
      BenchmarkReflect          386810586       383036621       -0.98%
      BenchmarkTar              154360072       152670594       -1.09%
      BenchmarkXML              217725693       216858727       -0.40%
      BenchmarkLinkCompiler     908813802       734363234       -19.20%
      BenchmarkStdCmd           32378532486     31222542974     -3.57%
      
      Fixes #31898.
      
      Change-Id: Ibf253a52ce9213325f42b1c2b20d0410f5c88c3b
      Reviewed-on: https://go-review.googlesource.com/c/go/+/176039Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      0793c810
    • Elias Naur's avatar
      misc/android: silence adb output unless an error occurs · fb63ed2b
      Elias Naur authored
      Fixes #31917
      
      Change-Id: I794e457b2245d355e2df5077078c67aa09e00ff9
      Reviewed-on: https://go-review.googlesource.com/c/go/+/175920
      Run-TryBot: Elias Naur <mail@eliasnaur.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      fb63ed2b
    • Russ Cox's avatar
      cmd/asm: accept TEXT f+0(SB) in -gensymabis mode · f766b680
      Russ Cox authored
      f+0(SB) is a non-standard but acceptable alias for f(SB).
      
      Fixes #30968.
      
      Change-Id: I499ccee4d3ff3ab4e47f75d99407aace858e59aa
      Reviewed-on: https://go-review.googlesource.com/c/go/+/174537Reviewed-by: default avatarAustin Clements <austin@google.com>
      f766b680
    • Russ Cox's avatar
      cmd/go: diagnose go.mod and vendor out of sync in std and cmd · 856b57e0
      Russ Cox authored
      The most common failure mode of the current std/cmd setup is
      going to be people running "go get m@latest" and then not running
      "go mod vendor" and being confused about getting the old m.
      Diagnose and report what to do.
      
      Also, having done the check, when in the standard library,
      switch the go command to -mod=vendor mode.
      This avoids some network accesses I saw when running
      'go clean -modcache' before doing some work in cmd.
      
      Change-Id: I0ba4a66637b67225a9b97a1c89f26f9015b41673
      Reviewed-on: https://go-review.googlesource.com/c/go/+/174528
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      856b57e0
  2. 08 May, 2019 16 commits
  3. 07 May, 2019 6 commits
  4. 06 May, 2019 14 commits