1. 05 Mar, 2018 7 commits
  2. 04 Mar, 2018 7 commits
  3. 03 Mar, 2018 7 commits
    • Giovanni Bajo's avatar
      test: port a nil-check interface test from asm_test · 8ce74b7d
      Giovanni Bajo authored
      Change-Id: I69c1688506d1aeca655047acf35d1bff966fc01e
      Reviewed-on: https://go-review.googlesource.com/98442
      Run-TryBot: Giovanni Bajo <rasky@develer.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      8ce74b7d
    • Giovanni Bajo's avatar
      test: use the version of Go used to run run.go · ec0b8c05
      Giovanni Bajo authored
      Currently, the top-level testsuite always uses whatever version
      of Go is found in the PATH to execute all the tests. This
      forces the developers to tweak the PATH to run the testsuite.
      
      Change it to use the same version of Go used to run run.go.
      This allows developers to run the testsuite using the tip
      compiler by simply saying "../bin/go run run.go".
      
      I think this is a better solution compared to always forcing
      "../bin/go", because it allows developers to run the testsuite
      using different Go versions, for instance to check if a new
      test is fixed in tip compared to the installed compiler.
      
      Fixes #24217
      
      Change-Id: I41b299c753b6e77c41e28be9091b2b630efea9d2
      Reviewed-on: https://go-review.googlesource.com/98439
      Run-TryBot: Giovanni Bajo <rasky@develer.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      ec0b8c05
    • Pascal S. de Kloe's avatar
      encoding/json: apply conventional error handling in decoder · 74a92b8e
      Pascal S. de Kloe authored
      name                            old time/op    new time/op    delta
      CodeEncoder-12                    1.89ms ± 1%    1.91ms ± 0%   +1.16%  (p=0.000 n=20+19)
      CodeMarshal-12                    2.09ms ± 1%    2.12ms ± 0%   +1.63%  (p=0.000 n=17+18)
      CodeDecoder-12                    8.43ms ± 1%    8.32ms ± 1%   -1.35%  (p=0.000 n=18+20)
      UnicodeDecoder-12                  399ns ± 0%     339ns ± 0%  -15.00%  (p=0.000 n=20+19)
      DecoderStream-12                   281ns ± 1%     231ns ± 0%  -17.91%  (p=0.000 n=20+16)
      CodeUnmarshal-12                  9.35ms ± 2%    9.15ms ± 2%   -2.11%  (p=0.000 n=20+20)
      CodeUnmarshalReuse-12             8.41ms ± 2%    8.29ms ± 2%   -1.34%  (p=0.000 n=20+20)
      UnmarshalString-12                81.2ns ± 2%    74.0ns ± 4%   -8.89%  (p=0.000 n=20+20)
      UnmarshalFloat64-12               71.1ns ± 2%    64.3ns ± 1%   -9.60%  (p=0.000 n=20+19)
      UnmarshalInt64-12                 60.6ns ± 2%    53.2ns ± 0%  -12.28%  (p=0.000 n=18+18)
      Issue10335-12                     96.9ns ± 0%    87.7ns ± 1%   -9.52%  (p=0.000 n=17+20)
      Unmapped-12                        247ns ± 4%     231ns ± 3%   -6.34%  (p=0.000 n=20+20)
      TypeFieldsCache/MissTypes1-12     11.1µs ± 0%    11.1µs ± 0%     ~     (p=0.376 n=19+20)
      TypeFieldsCache/MissTypes10-12    33.9µs ± 0%    33.8µs ± 0%   -0.32%  (p=0.000 n=18+9)
      
      name                            old speed      new speed      delta
      CodeEncoder-12                  1.03GB/s ± 1%  1.01GB/s ± 0%   -1.15%  (p=0.000 n=20+19)
      CodeMarshal-12                   930MB/s ± 1%   915MB/s ± 0%   -1.60%  (p=0.000 n=17+18)
      CodeDecoder-12                   230MB/s ± 1%   233MB/s ± 1%   +1.37%  (p=0.000 n=18+20)
      UnicodeDecoder-12               35.0MB/s ± 0%  41.2MB/s ± 0%  +17.60%  (p=0.000 n=20+19)
      CodeUnmarshal-12                 208MB/s ± 2%   212MB/s ± 2%   +2.16%  (p=0.000 n=20+20)
      
      name                            old alloc/op   new alloc/op   delta
      Issue10335-12                       184B ± 0%      184B ± 0%     ~     (all equal)
      Unmapped-12                         216B ± 0%      216B ± 0%     ~     (all equal)
      
      name                            old allocs/op  new allocs/op  delta
      Issue10335-12                       3.00 ± 0%      3.00 ± 0%     ~     (all equal)
      Unmapped-12                         4.00 ± 0%      4.00 ± 0%     ~     (all equal)
      
      Change-Id: I4b1a87a205da2ef9a572f86f85bc833653c61570
      Reviewed-on: https://go-review.googlesource.com/98440Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      74a92b8e
    • Tobias Klauser's avatar
      runtime: use vDSO for clock_gettime on linux/arm · 51b02711
      Tobias Klauser authored
      Use the __vdso_clock_gettime fast path via the vDSO on linux/arm to
      speed up nanotime and walltime. This results in the following
      performance improvement for time.Now on a RaspberryPi 3 (running
      32bit Raspbian, i.e. GOOS=linux/GOARCH=arm):
      
      name     old time/op  new time/op  delta
      TimeNow  0.99µs ± 0%  0.39µs ± 1%  -60.74%  (p=0.000 n=12+20)
      
      Change-Id: I3598278a6c88d7f6a6ce66c56b9d25f9dd2f4c9a
      Reviewed-on: https://go-review.googlesource.com/98095Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      51b02711
    • Tobias Klauser's avatar
      runtime: remove unused __vdso_time_sym · c69f60d0
      Tobias Klauser authored
      It's unused since https://golang.org/cl/99320043
      
      Change-Id: I74d69ff894aa2fb556f1c2083406c118c559d91b
      Reviewed-on: https://go-review.googlesource.com/98195
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      c69f60d0
    • Keith Randall's avatar
      internal/bytealg: move equal functions to bytealg · 1dfa380e
      Keith Randall authored
      Move bytes.Equal, runtime.memequal, and runtime.memequal_varlen
      to the bytealg package.
      
      Update #19792
      
      Change-Id: Ic4175e952936016ea0bda6c7c3dbb33afdc8e4ac
      Reviewed-on: https://go-review.googlesource.com/98355
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1dfa380e
    • Joe Tsai's avatar
      encoding/json: use sync.Map for field cache · f0756ca2
      Joe Tsai authored
      The previous type cache is quadratic in time in the situation where
      new types are continually encountered. Now that it is possible to dynamically
      create new types with the reflect package, this can cause json to
      perform very poorly.
      
      Switch to sync.Map which does well when the cache has hit steady state,
      but also handles occasional updates in better than quadratic time.
      
      benchmark                                     old ns/op      new ns/op     delta
      BenchmarkTypeFieldsCache/MissTypes1-8         14817          16202         +9.35%
      BenchmarkTypeFieldsCache/MissTypes10-8        70926          69144         -2.51%
      BenchmarkTypeFieldsCache/MissTypes100-8       976467         208973        -78.60%
      BenchmarkTypeFieldsCache/MissTypes1000-8      79520162       1750371       -97.80%
      BenchmarkTypeFieldsCache/MissTypes10000-8     6873625837     16847806      -99.75%
      BenchmarkTypeFieldsCache/HitTypes1000-8       7.51           8.80          +17.18%
      BenchmarkTypeFieldsCache/HitTypes10000-8      7.58           8.68          +14.51%
      
      The old implementation takes 12 minutes just to build a cache of size 1e5
      due to the quadratic behavior. I did not bother benchmark sizes above that.
      
      Change-Id: I5e6facc1eb8e1b80e5ca285e4dd2cc8815618dad
      Reviewed-on: https://go-review.googlesource.com/76850
      Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
      Reviewed-by: 's avatarBryan Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f0756ca2
  4. 02 Mar, 2018 16 commits
    • Shamil Garatuev's avatar
      internal/syscall/windows/registry: improve ReadSubKeyNames permissions · e658b85f
      Shamil Garatuev authored
      Make ReadSubKeyNames work even if key is opened with only
      ENUMERATE_SUB_KEYs access rights mask.
      
      Fixes #23869
      
      Change-Id: I138bd51715fdbc3bda05607c64bde1150f4fe6b2
      Reviewed-on: https://go-review.googlesource.com/97435Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
      e658b85f
    • Keith Randall's avatar
      internal/bytealg: move IndexByte asssembly to the new bytealg package · 403ab0f2
      Keith Randall authored
      Move the IndexByte function from the runtime to a new bytealg package.
      The new package will eventually hold all the optimized assembly for
      groveling through byte slices and strings. It seems a better home for
      this code than randomly keeping it in runtime.
      
      Once this is in, the next step is to move the other functions
      (Compare, Equal, ...).
      
      Update #19792
      
      This change seems complicated enough that we might just declare
      "not worth it" and abandon.  Opinions welcome.
      
      The core assembly is all unchanged, except minor modifications where
      the code reads cpu feature bits.
      
      The wrapper functions have been cleaned up as they are now actually
      checked by vet.
      
      Change-Id: I9fa75bee5d85db3a65b3fd3b7997e60367523796
      Reviewed-on: https://go-review.googlesource.com/98016
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      403ab0f2
    • Brad Fitzpatrick's avatar
      net: skip flaky TestLookupLongTXT for now · dcedcaa5
      Brad Fitzpatrick authored
      Flaky tests failing trybots help nobody.
      
      Updates #22857
      
      Change-Id: I87bc018651ab4fe02560a6d24c08a1d7ccd8ba37
      Reviewed-on: https://go-review.googlesource.com/97416Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      dcedcaa5
    • Damien Mathieu's avatar
      net/http: lock the read-only mutex in shouldRedirect · 2fd1b523
      Damien Mathieu authored
      Since that method uses 'mux.m', we need to lock the mutex to avoid data races.
      
      Change-Id: I998448a6e482b5d6a1b24f3354bb824906e23172
      GitHub-Last-Rev: 163a7d4942e793b328e05a7eb91f6d3fdc4ba12b
      GitHub-Pull-Request: golang/go#23994
      Reviewed-on: https://go-review.googlesource.com/96575Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      2fd1b523
    • David du Colombier's avatar
      cmd/compile: skip TestEmptyDwarfRanges on Plan 9 · 1c9297c3
      David du Colombier authored
      TestEmptyDwarfRanges has been added in CL 94816.
      This test is failing on Plan 9 because executables
      don't have a DWARF symbol table.
      
      Fixes #24226.
      
      Change-Id: Iff7e34b8c2703a2f19ee8087a4d64d0bb98496cd
      Reviewed-on: https://go-review.googlesource.com/98275Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1c9297c3
    • Hana Kim's avatar
      internal/trace: Revert "remove backlinks from span/task end to start" · d3562c9d
      Hana Kim authored
      This reverts commit 16398894.
      This broke TestUserTaskSpan test.
      
      Change-Id: If5ff8bdfe84e8cb30787b03ead87205ece3d5601
      Reviewed-on: https://go-review.googlesource.com/98235Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      d3562c9d
    • Hana Kim's avatar
      internal/trace: remove backlinks from span/task end to start · 16398894
      Hana Kim authored
      Even though undocumented, the assumption is the Event's link field
      points to the following event in the future. The new span/task event
      processing breaks the assumption.
      
      Change-Id: I4ce2f30c67c4f525ec0a121a7e43d8bdd2ec3f77
      Reviewed-on: https://go-review.googlesource.com/96395Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      16398894
    • Alberto Donizetti's avatar
      test/codegen: add copyright headers to new codegen files · 644b2daf
      Alberto Donizetti authored
      Change-Id: I9fe6572d1043ef9ee09c0925059ded554ad24c6b
      Reviewed-on: https://go-review.googlesource.com/98215Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      644b2daf
    • Michael Fraenkel's avatar
      cmd/compile: convert type during finishcompare · 5b071bfa
      Michael Fraenkel authored
      When recursively calling walkexpr, r.Type is still the untyped value.
      It then sometimes recursively calls finishcompare, which complains that
      you can't compare the resulting expression to that untyped value.
      
      Updates #23834.
      
      Change-Id: I6b7acd3970ceaff8da9216bfa0ae24aca5dee828
      Reviewed-on: https://go-review.googlesource.com/97856Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      5b071bfa
    • Than McIntosh's avatar
      cmd/compile: add DWARF register mappings for ARM64. · 9b95611e
      Than McIntosh authored
      Add DWARF register mappings for ARM64, so that that arch will become
      usable with "-dwarflocationlists". [NB: I've plugged in a set of
      numbers from the doc, but this will require additional manual testing.]
      
      Change-Id: Id9aa63857bc8b4f5c825f49274101cf372e9e856
      Reviewed-on: https://go-review.googlesource.com/82515Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      9b95611e
    • Alessandro Arzilli's avatar
      cmd/link: fix up debug_range for dsymutil (revert CL 72371) · eca41af0
      Alessandro Arzilli authored
      Dsymutil, an utility used on macOS when externally linking executables,
      does not support base address selector entries in debug_ranges.
      
      CL 73271 worked around this problem by removing base address selectors
      and emitting CU-relative relocations for each list entry.
      
      This commit, as an optimization, reintroduces the base address
      selectors and changes the linker to remove them again, but only when it
      knows that it will have to invoke the external linker on macOS.
      
      Compilecmp comparing master with a branch that has scope tracking
      always enabled:
      
      completed   15 of   15, estimated time remaining 0s (eta 2:43PM)
      name        old time/op       new time/op       delta
      Template          272ms ± 8%        257ms ± 5%  -5.33%  (p=0.000 n=15+14)
      Unicode           124ms ± 7%        122ms ± 5%    ~     (p=0.210 n=14+14)
      GoTypes           873ms ± 3%        870ms ± 5%    ~     (p=0.856 n=15+13)
      Compiler          4.49s ± 2%        4.49s ± 5%    ~     (p=0.982 n=14+14)
      SSA               11.8s ± 4%        11.8s ± 3%    ~     (p=0.653 n=15+15)
      Flate             163ms ± 6%        164ms ± 9%    ~     (p=0.914 n=14+15)
      GoParser          203ms ± 6%        202ms ±10%    ~     (p=0.571 n=14+14)
      Reflect           547ms ± 7%        542ms ± 4%    ~     (p=0.914 n=15+14)
      Tar               244ms ± 7%        237ms ± 3%  -2.80%  (p=0.002 n=14+13)
      XML               289ms ± 6%        289ms ± 5%    ~     (p=0.839 n=14+14)
      [Geo mean]        537ms             531ms       -1.10%
      
      name        old user-time/op  new user-time/op  delta
      Template          360ms ± 4%        341ms ± 7%  -5.16%  (p=0.000 n=14+14)
      Unicode           189ms ±11%        190ms ± 8%    ~     (p=0.844 n=15+15)
      GoTypes           1.13s ± 4%        1.14s ± 7%    ~     (p=0.582 n=15+14)
      Compiler          5.34s ± 2%        5.40s ± 4%  +1.19%  (p=0.036 n=11+13)
      SSA               14.7s ± 2%        14.7s ± 3%    ~     (p=0.602 n=15+15)
      Flate             211ms ± 7%        214ms ± 8%    ~     (p=0.252 n=14+14)
      GoParser          267ms ±12%        266ms ± 2%    ~     (p=0.837 n=15+11)
      Reflect           706ms ± 4%        701ms ± 3%    ~     (p=0.213 n=14+12)
      Tar               331ms ± 9%        320ms ± 5%  -3.30%  (p=0.025 n=15+14)
      XML               378ms ± 4%        373ms ± 6%    ~     (p=0.253 n=14+15)
      [Geo mean]        704ms             700ms       -0.58%
      
      name        old alloc/op      new alloc/op      delta
      Template         38.0MB ± 0%       38.4MB ± 0%  +1.12%  (p=0.000 n=15+15)
      Unicode          28.8MB ± 0%       28.8MB ± 0%  +0.17%  (p=0.000 n=15+15)
      GoTypes           112MB ± 0%        114MB ± 0%  +1.47%  (p=0.000 n=15+15)
      Compiler          465MB ± 0%        473MB ± 0%  +1.71%  (p=0.000 n=15+15)
      SSA              1.48GB ± 0%       1.53GB ± 0%  +3.07%  (p=0.000 n=15+15)
      Flate            24.3MB ± 0%       24.7MB ± 0%  +1.67%  (p=0.000 n=15+15)
      GoParser         30.7MB ± 0%       31.0MB ± 0%  +1.15%  (p=0.000 n=12+15)
      Reflect          76.3MB ± 0%       77.1MB ± 0%  +0.97%  (p=0.000 n=15+15)
      Tar              39.2MB ± 0%       39.6MB ± 0%  +0.91%  (p=0.000 n=15+15)
      XML              41.5MB ± 0%       42.0MB ± 0%  +1.29%  (p=0.000 n=15+15)
      [Geo mean]       77.5MB            78.6MB       +1.35%
      
      name        old allocs/op     new allocs/op     delta
      Template           385k ± 0%         387k ± 0%  +0.51%  (p=0.000 n=15+15)
      Unicode            342k ± 0%         343k ± 0%  +0.10%  (p=0.000 n=14+15)
      GoTypes           1.19M ± 0%        1.19M ± 0%  +0.62%  (p=0.000 n=15+15)
      Compiler          4.51M ± 0%        4.54M ± 0%  +0.50%  (p=0.000 n=14+15)
      SSA               12.2M ± 0%        12.4M ± 0%  +1.12%  (p=0.000 n=14+15)
      Flate              234k ± 0%         236k ± 0%  +0.60%  (p=0.000 n=15+15)
      GoParser           318k ± 0%         320k ± 0%  +0.60%  (p=0.000 n=15+15)
      Reflect            974k ± 0%         977k ± 0%  +0.27%  (p=0.000 n=15+15)
      Tar                395k ± 0%         397k ± 0%  +0.37%  (p=0.000 n=14+15)
      XML                404k ± 0%         407k ± 0%  +0.53%  (p=0.000 n=15+15)
      [Geo mean]         794k              798k       +0.52%
      
      name        old text-bytes    new text-bytes    delta
      HelloSize         680kB ± 0%        680kB ± 0%    ~     (all equal)
      
      name        old data-bytes    new data-bytes    delta
      HelloSize        9.62kB ± 0%       9.62kB ± 0%    ~     (all equal)
      
      name        old bss-bytes     new bss-bytes     delta
      HelloSize         125kB ± 0%        125kB ± 0%    ~     (all equal)
      
      name        old exe-bytes     new exe-bytes     delta
      HelloSize        1.11MB ± 0%       1.13MB ± 0%  +1.85%  (p=0.000 n=15+15)
      
      Change-Id: I61c98ba0340cb798034b2bb55e3ab3a58ac1cf23
      Reviewed-on: https://go-review.googlesource.com/98075Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      eca41af0
    • Heschi Kreinick's avatar
      cmd/compile/internal/ssa: batch up all zero-width instructions · 9dc351be
      Heschi Kreinick authored
      When generating location lists, batch up changes for all zero-width
      instructions, not just phis. This prevents the creation of location list
      entries that don't actually cover any instructions.
      
      This isn't perfect because of the caveats in the prior CL (Copy is
      zero-width sometimes) but in practice this seems to fix all of the empty
      lists in std.
      
      Change-Id: Ice4a9ade36b6b24ca111d1494c414eec96e5af25
      Reviewed-on: https://go-review.googlesource.com/97958
      Run-TryBot: Heschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      9dc351be
    • Heschi Kreinick's avatar
      cmd/compile/internal/ssa: note zero-width Ops · caa1b4af
      Heschi Kreinick authored
      Add a bool to opInfo to indicate if an Op never results in any
      instructions. This is a conservative approximation: some operations,
      like Copy, may or may not generate code depending on their arguments.
      
      I built the list by reading each arch's ssaGenValue function. Hopefully
      I got them all.
      
      Change-Id: I130b251b65f18208294e129bb7ddc3f91d57d31d
      Reviewed-on: https://go-review.googlesource.com/97957Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      caa1b4af
    • Zhou Peng's avatar
      runtime: fix typo, func comments should start with function name · b77aad08
      Zhou Peng authored
      Change-Id: I289af4884583537639800e37928c22814d38cba9
      Reviewed-on: https://go-review.googlesource.com/98115Reviewed-by: 's avatarAlberto Donizetti <alb.donizetti@gmail.com>
      b77aad08
    • Alessandro Arzilli's avatar
      cmd/compile: optimize scope tracking · 3fca7306
      Alessandro Arzilli authored
      1. Detect and remove the markers of lexical scopes that don't contain
      any variables early in noder, instead of waiting until the end of DWARF
      generation.
      This saves memory by never allocating some of the markers and optimizes
      some of the algorithms that depend on the number of scopes.
      
      2. Assign scopes to Progs by doing, for each Prog, a binary search over
      the markers array. This is faster, compared to sorting the Prog list
      because there are fewer markers than there are Progs.
      
      completed   15 of   15, estimated time remaining 0s (eta 2:30PM)
      name        old time/op       new time/op       delta
      Template          274ms ± 5%        260ms ± 6%  -4.91%  (p=0.000 n=15+15)
      Unicode           126ms ± 5%        127ms ± 9%    ~     (p=0.856 n=13+15)
      GoTypes           861ms ± 5%        857ms ± 4%    ~     (p=0.595 n=15+15)
      Compiler          4.11s ± 4%        4.12s ± 5%    ~     (p=1.000 n=15+15)
      SSA               10.7s ± 2%        10.9s ± 4%  +2.01%  (p=0.002 n=14+14)
      Flate             163ms ± 4%        166ms ± 9%    ~     (p=0.134 n=14+15)
      GoParser          203ms ± 4%        205ms ± 6%    ~     (p=0.461 n=15+15)
      Reflect           544ms ± 5%        549ms ± 4%    ~     (p=0.174 n=15+15)
      Tar               249ms ± 9%        245ms ± 6%    ~     (p=0.285 n=15+15)
      XML               286ms ± 4%        291ms ± 5%    ~     (p=0.081 n=15+15)
      [Geo mean]        528ms             529ms       +0.14%
      
      name        old user-time/op  new user-time/op  delta
      Template          358ms ± 7%        354ms ± 5%    ~     (p=0.242 n=14+15)
      Unicode           189ms ±11%        191ms ±10%    ~     (p=0.438 n=15+15)
      GoTypes           1.15s ± 4%        1.14s ± 3%    ~     (p=0.405 n=15+15)
      Compiler          5.36s ± 6%        5.35s ± 5%    ~     (p=0.588 n=15+15)
      SSA               14.6s ± 3%        15.0s ± 4%  +2.58%  (p=0.000 n=15+15)
      Flate             214ms ±12%        216ms ± 8%    ~     (p=0.539 n=15+15)
      GoParser          267ms ± 6%        270ms ± 5%    ~     (p=0.569 n=15+15)
      Reflect           712ms ± 5%        709ms ± 4%    ~     (p=0.894 n=15+15)
      Tar               329ms ± 8%        330ms ± 5%    ~     (p=0.974 n=14+15)
      XML               371ms ± 3%        381ms ± 5%  +2.85%  (p=0.002 n=13+15)
      [Geo mean]        705ms             709ms       +0.62%
      
      name        old alloc/op      new alloc/op      delta
      Template         38.0MB ± 0%       38.4MB ± 0%  +1.27%  (p=0.000 n=15+14)
      Unicode          28.8MB ± 0%       28.8MB ± 0%  +0.16%  (p=0.000 n=15+14)
      GoTypes           112MB ± 0%        114MB ± 0%  +1.64%  (p=0.000 n=15+15)
      Compiler          465MB ± 0%        474MB ± 0%  +1.91%  (p=0.000 n=15+15)
      SSA              1.48GB ± 0%       1.53GB ± 0%  +3.32%  (p=0.000 n=15+15)
      Flate            24.3MB ± 0%       24.8MB ± 0%  +1.77%  (p=0.000 n=14+15)
      GoParser         30.7MB ± 0%       31.1MB ± 0%  +1.27%  (p=0.000 n=15+15)
      Reflect          76.3MB ± 0%       77.1MB ± 0%  +1.03%  (p=0.000 n=15+15)
      Tar              39.2MB ± 0%       39.6MB ± 0%  +1.02%  (p=0.000 n=13+15)
      XML              41.5MB ± 0%       42.1MB ± 0%  +1.45%  (p=0.000 n=15+15)
      [Geo mean]       77.5MB            78.7MB       +1.48%
      
      name        old allocs/op     new allocs/op     delta
      Template           385k ± 0%         387k ± 0%  +0.54%  (p=0.000 n=15+15)
      Unicode            342k ± 0%         343k ± 0%  +0.10%  (p=0.000 n=15+15)
      GoTypes           1.19M ± 0%        1.19M ± 0%  +0.64%  (p=0.000 n=14+15)
      Compiler          4.51M ± 0%        4.54M ± 0%  +0.53%  (p=0.000 n=15+15)
      SSA               12.2M ± 0%        12.4M ± 0%  +1.16%  (p=0.000 n=15+15)
      Flate              234k ± 0%         236k ± 0%  +0.63%  (p=0.000 n=14+15)
      GoParser           318k ± 0%         320k ± 0%  +0.63%  (p=0.000 n=15+15)
      Reflect            974k ± 0%         977k ± 0%  +0.28%  (p=0.000 n=15+15)
      Tar                395k ± 0%         397k ± 0%  +0.38%  (p=0.000 n=15+13)
      XML                404k ± 0%         407k ± 0%  +0.55%  (p=0.000 n=15+15)
      [Geo mean]         794k              799k       +0.55%
      
      name        old text-bytes    new text-bytes    delta
      HelloSize         680kB ± 0%        680kB ± 0%    ~     (all equal)
      
      name        old data-bytes    new data-bytes    delta
      HelloSize        9.62kB ± 0%       9.62kB ± 0%    ~     (all equal)
      
      name        old bss-bytes     new bss-bytes     delta
      HelloSize         125kB ± 0%        125kB ± 0%    ~     (all equal)
      
      name        old exe-bytes     new exe-bytes     delta
      HelloSize        1.11MB ± 0%       1.12MB ± 0%  +1.11%  (p=0.000 n=15+15)
      
      Change-Id: I95a0173ee28c52be1a4851d2a6e389529e74bf28
      Reviewed-on: https://go-review.googlesource.com/95396
      Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      Reviewed-by: 's avatarHeschi Kreinick <heschi@google.com>
      3fca7306
    • Tobias Klauser's avatar
      syscall: fix nil pointer dereference in Select on linux/{arm64,mips64x} · 1023b016
      Tobias Klauser authored
      The timeout parameter might be nil, don't dereference it
      unconditionally.
      
      Fixes #24189
      
      Change-Id: I03e6a1ab74fe30322ce6bcfd3d6c42130b6d61be
      Reviewed-on: https://go-review.googlesource.com/97819
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1023b016
  5. 01 Mar, 2018 3 commits
    • Brad Fitzpatrick's avatar
      Revert "runtime: use bytes.IndexByte in findnull" · 1fadbc1a
      Brad Fitzpatrick authored
      This reverts commit 7365fac2.
      
      Reason for revert: breaks the build on some architectures, reading unmapped pages?
      
      Change-Id: I3a8c02dc0b649269faacea79ecd8213defa97c54
      Reviewed-on: https://go-review.googlesource.com/97995Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1fadbc1a
    • Heschi Kreinick's avatar
      cmd/link: fix up location lists for dsymutil · f1fc9da3
      Heschi Kreinick authored
      LLVM tools, particularly lldb and dsymutil, don't support base address
      selection entries in location lists. When targeting GOOS=darwin,
      mode, have the linker translate location lists to CU-relative form
      instead.
      
      Technically, this isn't necessary when linking internally, as long as
      nobody plans to use anything other than Delve to look at the DWARF. But
      someone might want to use lldb, and it's really confusing when dwarfdump
      shows gibberish for the location entries. The performance cost isn't
      noticeable, so enable it even for internal linking.
      
      Doing this in the linker is a little weird, but it was more expensive in
      the compiler, probably because the compiler is much more stressful to
      the GC. Also, if we decide to only do it for external linking, the
      compiler can't see the link mode.
      
      Benchmark before and after this commit on Mac with -dwarflocationlists=1:
      
      name        old time/op       new time/op       delta
      StdCmd            21.3s ± 1%        21.3s ± 1%    ~     (p=0.310 n=27+27)
      
      Only StdCmd is relevant, because only StdCmd runs the linker. Whatever
      the cost is here, it's not very large.
      
      Change-Id: Ic8ef780d0e263230ce6aa3ca3a32fc9abd750b1e
      Reviewed-on: https://go-review.googlesource.com/97956
      Run-TryBot: Heschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      f1fc9da3
    • Heschi Kreinick's avatar
      cmd/compile/internal/ssa: avoid accidental list ends · bff29f2d
      Heschi Kreinick authored
      Some SSA values don't translate into any instructions. If a function
      began with two of them, and both modified the storage of the same
      variable, we'd end up with a location list entry that started and ended
      at 0. That looks like an end-of-list entry, which would then confuse
      downstream tools, particularly the fixup in the linker.
      
      "Fix" this by changing the end of such entries to 1. Should be harmless,
      since AFAIK we don't generate any 1-byte instructions. Later CLs will
      reduce the frequency of these entries anyway.
      
      Change-Id: I9b7e5e69f914244cc826fb9f4a6acfe2dc695f81
      Reviewed-on: https://go-review.googlesource.com/97955
      Run-TryBot: Heschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      bff29f2d