1. 17 Apr, 2016 3 commits
  2. 16 Apr, 2016 10 commits
  3. 15 Apr, 2016 18 commits
    • Morten Siebuhr's avatar
      net: fix looking up port numbers starting with numbers. · 002c69e0
      Morten Siebuhr authored
      LookupPort() correctly parses service names beginning with numerals by
      implementing a new parser, mainly taken from strconv/atoi.go.
      
      Also testes some previously undefined behaviours around port numbers
      larger than 65535 that previously could lead to some tests fail with
      EOPNOTSUPP (Operation Not Supported).
      
      Fixes #14322
      
      Change-Id: I1b90dbed434494723e261d84e73fe705e5c0507a
      Reviewed-on: https://go-review.googlesource.com/19720
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
      002c69e0
    • Brad Fitzpatrick's avatar
      net: context plumbing, add Dialer.DialContext · b6b4004d
      Brad Fitzpatrick authored
      For #12580 (http.Transport tracing/analytics)
      Updates #13021
      
      Change-Id: I126e494a7bd872e42c388ecb58499ecbf0f014cc
      Reviewed-on: https://go-review.googlesource.com/22101
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
      b6b4004d
    • Ian Lance Taylor's avatar
      cmd/cgo: add missing formatting directive in error message · 1d0977a1
      Ian Lance Taylor authored
      Fixes #15310.
      
      Change-Id: I588b3c630a20a6878f7cd00f9af29b1dd8a4abf6
      Reviewed-on: https://go-review.googlesource.com/22100
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      1d0977a1
    • Matthew Dempsky's avatar
      cmd/compile: remove dead flags · d57a118a
      Matthew Dempsky authored
      For some time now, the -d flag has been used to control various named
      debug options, rather than setting Debug['d']. Consequently, that
      means dflag() always returns false, which means the -y flag is also
      useless.
      
      Similarly, Debug['L'] is never used anywhere, so the -L flag can be
      dropped too.
      
      Change-Id: I4bb12454e462410115ec4f5565facf76c5c2f255
      Reviewed-on: https://go-review.googlesource.com/22121Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      d57a118a
    • Matthew Dempsky's avatar
      archive/tar: style nit: s/nano_buf/nanoBuf/ · 75c079cb
      Matthew Dempsky authored
      Pointed out during review of golang.org/cl/22104.
      
      Change-Id: If8842e7f8146441e918ec6a2b6e893b7cf88615c
      Reviewed-on: https://go-review.googlesource.com/22120
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      75c079cb
    • Mikio Hara's avatar
      runtime: don't always unblock all signals on dragonfly, freebsd and openbsd · 6f59ccb0
      Mikio Hara authored
      https://golang.org/cl/10173 intrduced msigsave, ensureSigM and
      _SigUnblock but didn't enable the new signal save/restore mechanism for
      SIG{HUP,INT,QUIT,ABRT,TERM} on DragonFly BSD, FreeBSD and OpenBSD.
      
      At present, it looks like they have the implementation. This change
      enables the new mechanism on DragonFly BSD, FreeBSD and OpenBSD the same
      as Darwin, NetBSD.
      
      Change-Id: Ifb4b4743b3b4f50bfcdc7cf1fe1b59c377fa2a41
      Reviewed-on: https://go-review.googlesource.com/18657
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      6f59ccb0
    • Martin Möhrmann's avatar
      fmt: optimize struct layout and intbuf size · 7345fa54
      Martin Möhrmann authored
      Move boolean fields to the end of the pp struct for better packing.
      
      Increase the fmt.intbuf size to leave no padding space unused
      at the end of the fmt struct on 32 bit architectures.
      
      The size of the pp struct on amd64 is decreased from 192 byte
      to 184 byte and on 386 from 132 byte to 128 byte.
      
      Simplify buffer size calculation in fmt_integer.
      
      Consolidate test cases for intbuf overflow checks.
      
      amd64 Haswell:
      
      name                     old time/op  new time/op  delta
      SprintfPadding-2          227ns ± 2%   227ns ± 1%    ~     (p=0.941 n=25+25)
      SprintfEmpty-2           38.4ns ± 6%  35.8ns ±23%  -6.71%  (p=0.030 n=24+25)
      SprintfString-2           100ns ± 0%   101ns ± 0%  +1.00%  (p=0.000 n=19+18)
      SprintfTruncateString-2   142ns ± 1%   142ns ± 1%  +0.37%  (p=0.028 n=25+25)
      SprintfQuoteString-2      397ns ± 0%   393ns ± 0%  -0.82%  (p=0.000 n=21+24)
      SprintfInt-2              101ns ± 2%   102ns ± 4%    ~     (p=0.159 n=21+24)
      SprintfIntInt-2           155ns ± 3%   155ns ± 3%    ~     (p=0.934 n=25+25)
      SprintfPrefixedInt-2      252ns ± 2%   251ns ± 2%    ~     (p=0.198 n=25+25)
      SprintfFloat-2            184ns ± 3%   179ns ± 2%  -3.07%  (p=0.000 n=24+25)
      SprintfComplex-2          532ns ± 2%   535ns ± 2%  +0.64%  (p=0.046 n=25+24)
      SprintfBoolean-2         90.5ns ± 3%  91.6ns ± 2%  +1.17%  (p=0.000 n=22+22)
      SprintfHexString-2        164ns ± 2%   165ns ± 3%    ~     (p=0.066 n=25+25)
      SprintfHexBytes-2         171ns ± 3%   170ns ± 3%    ~     (p=0.941 n=25+24)
      SprintfBytes-2            320ns ± 1%   313ns ± 1%  -2.31%  (p=0.000 n=24+21)
      SprintfStringer-2         347ns ± 2%   348ns ± 2%    ~     (p=0.426 n=24+24)
      SprintfStructure-2        753ns ± 1%   742ns ± 1%  -1.49%  (p=0.000 n=24+25)
      FprintInt-2               145ns ± 0%   144ns ± 0%  -0.69%  (p=0.000 n=24+23)
      FprintfBytes-2            163ns ± 0%   163ns ± 0%  -0.27%  (p=0.000 n=25+25)
      FprintIntNoAlloc-2        108ns ± 0%   105ns ± 0%  -2.78%  (p=0.000 n=25+2
      
      386 Haswell:
      
      name                     old time/op  new time/op  delta
      SprintfPadding-2          426ns ± 2%   422ns ± 1%  -0.89%  (p=0.000 n=25+24)
      SprintfEmpty-2           24.6ns ± 1%  24.5ns ± 0%  -0.39%  (p=0.000 n=22+15)
      SprintfString-2          99.1ns ± 3%  95.6ns ± 0%  -3.52%  (p=0.000 n=25+24)
      SprintfTruncateString-2   156ns ± 4%   153ns ± 1%  -1.65%  (p=0.000 n=24+23)
      SprintfQuoteString-2      500ns ± 2%   493ns ± 1%  -1.49%  (p=0.000 n=25+24)
      SprintfInt-2             92.6ns ± 9%  88.3ns ± 1%  -4.72%  (p=0.000 n=25+25)
      SprintfIntInt-2           143ns ± 7%   137ns ± 2%  -4.01%  (p=0.000 n=23+25)
      SprintfPrefixedInt-2      268ns ±19%   264ns ±16%    ~     (p=0.826 n=24+24)
      SprintfFloat-2            242ns ± 4%   246ns ± 2%  +1.60%  (p=0.000 n=25+25)
      SprintfComplex-2         1.04µs ± 3%  1.03µs ± 1%  -0.89%  (p=0.026 n=25+25)
      SprintfBoolean-2         82.2ns ± 9%  80.7ns ± 2%    ~     (p=0.163 n=24+24)
      SprintfHexString-2        240ns ± 5%   224ns ± 2%  -6.94%  (p=0.000 n=25+25)
      SprintfHexBytes-2         245ns ± 3%   234ns ± 2%  -4.55%  (p=0.000 n=25+25)
      SprintfBytes-2            432ns ±13%   419ns ± 2%    ~     (p=0.081 n=23+25)
      SprintfStringer-2         356ns ± 4%   356ns ± 4%    ~     (p=0.988 n=25+25)
      SprintfStructure-2        968ns ± 5%   948ns ± 2%  -2.11%  (p=0.000 n=25+25)
      FprintInt-2               206ns ± 0%   201ns ± 0%  -2.43%  (p=0.000 n=25+21)
      FprintfBytes-2            187ns ± 1%   187ns ± 1%    ~     (p=0.420 n=25+25)
      FprintIntNoAlloc-2        173ns ± 0%   168ns ± 0%  -2.89%  (p=0.000 n=25+2
      
      amd64 Ivy Bridge:
      
      name                     old time/op  new time/op  delta
      SprintfPadding-4          203ns ± 4%   210ns ± 8%  +3.27%  (p=0.000 n=23+25)
      SprintfEmpty-4           24.4ns ± 2%  24.4ns ± 3%    ~     (p=0.487 n=24+25)
      SprintfString-4          92.4ns ± 2%  93.1ns ± 3%    ~     (p=0.087 n=22+25)
      SprintfTruncateString-4   137ns ± 3%   136ns ± 2%  -1.02%  (p=0.002 n=25+25)
      SprintfQuoteString-4      378ns ± 1%   373ns ± 1%  -1.32%  (p=0.000 n=24+22)
      SprintfInt-4             89.9ns ± 3%  90.3ns ± 4%    ~     (p=0.444 n=25+25)
      SprintfIntInt-4           137ns ± 4%   138ns ± 3%    ~     (p=0.112 n=25+23)
      SprintfPrefixedInt-4      155ns ±14%   154ns ±14%    ~     (p=0.791 n=25+25)
      SprintfFloat-4            154ns ± 2%   154ns ± 3%    ~     (p=0.789 n=25+25)
      SprintfComplex-4          396ns ± 2%   402ns ± 3%  +1.53%  (p=0.001 n=23+25)
      SprintfBoolean-4         71.0ns ± 3%  71.2ns ± 2%    ~     (p=0.515 n=25+24)
      SprintfHexString-4        156ns ± 3%   150ns ± 5%  -3.69%  (p=0.000 n=24+25)
      SprintfHexBytes-4         154ns ± 3%   157ns ± 5%  +1.72%  (p=0.003 n=24+25)
      SprintfBytes-4            297ns ± 4%   291ns ± 3%  -1.86%  (p=0.000 n=25+25)
      SprintfStringer-4         275ns ± 3%   265ns ± 3%  -3.51%  (p=0.000 n=25+25)
      SprintfStructure-4        878ns ± 2%   823ns ± 2%  -6.21%  (p=0.000 n=25+22)
      FprintInt-4               145ns ± 1%   147ns ± 2%  +0.94%  (p=0.001 n=23+25)
      FprintfBytes-4            166ns ± 1%   168ns ± 2%  +0.81%  (p=0.000 n=24+25)
      FprintIntNoAlloc-4        113ns ± 2%   109ns ± 2%  -3.79%  (p=0.000 n=24+25)
      
      386 Ivy Bridge:
      
      name                     old time/op  new time/op  delta
      SprintfPadding-4          353ns ± 4%   354ns ± 4%    ~     (p=0.769 n=25+24)
      SprintfEmpty-4           21.9ns ± 6%  21.1ns ± 3%  -3.45%  (p=0.000 n=24+25)
      SprintfString-4          94.7ns ± 1%  93.0ns ± 3%  -1.77%  (p=0.000 n=24+23)
      SprintfTruncateString-4   150ns ± 2%   147ns ± 0%  -1.71%  (p=0.000 n=25+21)
      SprintfQuoteString-4      472ns ± 1%   479ns ± 1%  +1.48%  (p=0.000 n=25+23)
      SprintfInt-4             87.0ns ± 2%  85.3ns ± 2%  -1.95%  (p=0.000 n=25+25)
      SprintfIntInt-4           137ns ± 2%   134ns ± 2%  -1.97%  (p=0.000 n=24+23)
      SprintfPrefixedInt-4      166ns ± 8%   161ns ± 8%  -3.07%  (p=0.023 n=24+24)
      SprintfFloat-4            226ns ± 1%   219ns ± 1%  -2.97%  (p=0.000 n=24+25)
      SprintfComplex-4          867ns ± 1%   784ns ± 1%  -9.47%  (p=0.000 n=24+23)
      SprintfBoolean-4         77.2ns ± 2%  76.0ns ± 2%  -1.63%  (p=0.000 n=25+25)
      SprintfHexString-4        212ns ± 2%   214ns ± 2%  +0.96%  (p=0.000 n=25+25)
      SprintfHexBytes-4         221ns ± 2%   218ns ± 1%  -1.42%  (p=0.000 n=25+24)
      SprintfBytes-4            423ns ± 3%   417ns ± 1%  -1.49%  (p=0.000 n=25+24)
      SprintfStringer-4         306ns ± 3%   298ns ± 3%  -2.57%  (p=0.000 n=24+25)
      SprintfStructure-4       1.00µs ± 2%  0.98µs ± 2%  -1.34%  (p=0.000 n=24+24)
      FprintInt-4               202ns ± 3%   197ns ± 2%  -2.04%  (p=0.000 n=25+25)
      FprintfBytes-4            186ns ± 2%   184ns ± 2%  -0.88%  (p=0.000 n=24+25)
      FprintIntNoAlloc-4        170ns ± 2%   166ns ± 2%  -2.26%  (p=0.000 n=24+25)
      
      Change-Id: I46e62bf8b6afa90a24f75b40f1d354b2084b910b
      Reviewed-on: https://go-review.googlesource.com/20984
      Run-TryBot: Rob Pike <r@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRob Pike <r@golang.org>
      7345fa54
    • Conrad Irwin's avatar
      net/mail: allow utf-8 in ParseAddress · 7f52b439
      Conrad Irwin authored
      The existing implementation correctly supported RFC 5322, this
      change adds support for UTF-8 while parsing as specified by
      RFC 6532. The serialization code is unchanged, so emails created
      by go remain compatible with very legacy systems.
      
      Fixes #14260
      
      Change-Id: Ib57e510f5834d273605e1892679f2df19ea931b1
      Reviewed-on: https://go-review.googlesource.com/19687
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarAlexandre Cesaro <alexandre.cesaro@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      7f52b439
    • Ilya Tocar's avatar
      hash/adler32: Unroll loop for extra performance. · 89a1f028
      Ilya Tocar authored
      name         old time/op    new time/op    delta
      Adler32KB-4     592ns ± 0%     447ns ± 0%  -24.49%  (p=0.000 n=19+20)
      
      name         old speed      new speed      delta
      Adler32KB-4  1.73GB/s ± 0%  2.29GB/s ± 0%  +32.41%  (p=0.000 n=20+20)
      
      Change-Id: I38990aa66ca4452a886200018a57c0bc3af30717
      Reviewed-on: https://go-review.googlesource.com/21880Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      89a1f028
    • Martin Möhrmann's avatar
      image/color: order color computation to match rgb · 8955745b
      Martin Möhrmann authored
      The order of computation was switched unintentionally
      in https://go-review.googlesource.com/21910.
      
      Revert the order to first compute g then b.
      
      Change-Id: I8cedb5e45fbad2679246839f609bcac4f9052403
      Reviewed-on: https://go-review.googlesource.com/22016Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
      8955745b
    • Matthew Dempsky's avatar
      all: remove unnecessary type conversions · 0da4dbe2
      Matthew Dempsky authored
      cmd and runtime were handled separately, and I'm intentionally skipped
      syscall. This is the rest of the standard library.
      
      CL generated mechanically with github.com/mdempsky/unconvert.
      
      Change-Id: I9e0eff886974dedc37adb93f602064b83e469122
      Reviewed-on: https://go-review.googlesource.com/22104Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      0da4dbe2
    • Nigel Tao's avatar
      compress/flate: fix a fmt.Fprintf style nit in a test. · 80e7dddf
      Nigel Tao authored
      It's not a big deal (the for loop drops from 130-ish to 120-ish
      milliseconds for me) but it's not a big change either.
      
      Change-Id: I161a49caab5cae5a2b87866ed1dfb93627be8013
      Reviewed-on: https://go-review.googlesource.com/22110Reviewed-by: 's avatarKlaus Post <klauspost@gmail.com>
      Reviewed-by: 's avatarNigel Tao <nigeltao@golang.org>
      80e7dddf
    • Matthew Dempsky's avatar
      cmd/internal/obj, cmd/link: random style cleanups · 106b9d39
      Matthew Dempsky authored
      Identified during review of golang.org/cl/22103.
      
      Change-Id: I86bab4cc17204df1e45deefdb0d0f9a8f6e17073
      Reviewed-on: https://go-review.googlesource.com/22106
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      106b9d39
    • Matthew Dempsky's avatar
      cmd: remove unnecessary type conversions · 1441f769
      Matthew Dempsky authored
      CL generated mechanically with github.com/mdempsky/unconvert.
      
      Change-Id: Ic590315cbc7026163a1b3f8ea306ba35f1a53256
      Reviewed-on: https://go-review.googlesource.com/22103
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      1441f769
    • Matthew Dempsky's avatar
      cmd/internal/sys: cleanup documentation · e7b96e1a
      Matthew Dempsky authored
      Expand description of ArchFamily, because it seems to be a common
      source of confusion.  Also, update InFamily's description to reflect
      current name.
      
      Change-Id: I66b7999aef64ab8fee39aec0f752ae4f3a08d36d
      Reviewed-on: https://go-review.googlesource.com/22102Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      e7b96e1a
    • Mikio Hara's avatar
      net: cache IPv6 zone information for applications using IPv6 link-local address · 1d214f70
      Mikio Hara authored
      This change reduces the overhead of calling routing information per IPv6
      link-local datagram read by caching IPv6 addressing scope zone
      information.
      
      Fixes #15237.
      
      name                    old time/op    new time/op    delta
      UDP6LinkLocalUnicast-8    64.9µs ± 0%    18.6µs ± 0%  -71.30%
      
      name                    old alloc/op   new alloc/op   delta
      UDP6LinkLocalUnicast-8    11.2kB ± 0%     0.2kB ± 0%  -98.42%
      
      name                    old allocs/op  new allocs/op  delta
      UDP6LinkLocalUnicast-8       101 ± 0%         3 ± 0%  -97.03%
      
      Change-Id: I5ae2ef5058df1028bbb7f4ab32b13edfb330c3a7
      Reviewed-on: https://go-review.googlesource.com/21952Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      1d214f70
    • Mikio Hara's avatar
      net: relax TestInterfaces and TestInterfaceAddrs for BSD variants · 19db7456
      Mikio Hara authored
      Fixes #15249.
      
      Change-Id: I91fc3d6a2df294b21a67d085da6fe661827a850e
      Reviewed-on: https://go-review.googlesource.com/22079Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      19db7456
    • Todd Neal's avatar
      cmd/compile: speed up dom checking in cse · 77d37494
      Todd Neal authored
      Process a slice of equivalent values by setting replaced values to nil
      instead of removing them from the slice to eliminate copying.  Also take
      advantage of the entry number sort to break early once we reach a value
      in a block that is not dominated.
      
      For the code in issue #15112:
      
      Before:
      real    0m52.603s
      user    0m56.957s
      sys     0m1.213s
      
      After:
      real    0m22.048s
      user    0m26.445s
      sys     0m0.939s
      
      Updates #15112
      
      Change-Id: I06d9e1e1f1ad85d7fa196c5d51f0dc163907376d
      Reviewed-on: https://go-review.googlesource.com/22068Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      77d37494
  4. 14 Apr, 2016 9 commits
    • Joe Tsai's avatar
      compress/gzip: fix Reader to properly check FHCRC · d0e8d3a7
      Joe Tsai authored
      RFC 1952, section 3.2.3 says:
      >>>
      If FHCRC is set, a CRC16 for the gzip header is present,
      immediately before the compressed data. The CRC16 consists of the two
      least significant bytes of the CRC32 for all bytes of the
      gzip header up to and not including the CRC16.
      <<<
      
      Thus, instead of computing the CRC only over the first 10 bytes
      of the header, we compute it over the whole header (minus CRC16).
      
      Fixes #15070
      
      Change-Id: I55703fd30b535b12abeb5e3962d4da0a86ed615a
      Reviewed-on: https://go-review.googlesource.com/21466Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d0e8d3a7
    • Andrew Gerrand's avatar
      doc: add classes to version tags in source install instructions · d093a626
      Andrew Gerrand authored
      This will allow us to mechanically substitute these strings
      using javascript (in a forthcoming change to x/tools/godoc).
      
      Updates #14371
      
      Change-Id: I96e876283060ffbc9f3eabaf55d6b880685453e1
      Reviewed-on: https://go-review.googlesource.com/22055Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      d093a626
    • Robert Griesemer's avatar
      cmd/compile: first cut at exporting position info · 5c593a32
      Robert Griesemer authored
      - position info for all exported globals, plus methods and fields
      - use delta-encoded line number info in most cases
      - canonicalize all strings: each filename appears only once,
        but will also compact other strings (names) to at most one
        occurence in encoding
      - positions not yet hooked up when reading in
      
      Also:
      - adjusted go/importer (gcimporter)
      - some refactoring for better symmetry
      
      Stats:
      - comparison of export data size w/o and w/ position info (bytes).
      - delta is increase in %
      - overall (see bottom of table): 14% increase
      - however, the current binary format decreased from
        the original binary format last week by 14%
      - compared to original textual format: 65% decrease
        (increase by 14% after decrease by 14% still leads
        to a decrease from original textual format)
      
      (caveat: we used the textual size from last week, assuming
      it has not changed - there may be a small error here).
      
      package				w/o pos	w/ pos	delta
      
      archive/tar			4234	4902	16%
      archive/zip			6387	7340	15%
      bufio				3106	3419	10%
      bytes				4362	4757	9%
      cmd/addr2line			27	70	159%
      cmd/api				12065	13590	13%
      cmd/asm				27	64	137%
      cmd/asm/internal/arch		9957	11529	16%
      cmd/asm/internal/asm		11788	13385	14%
      cmd/asm/internal/flags		239	311	30%
      cmd/asm/internal/lex		13415	15358	14%
      cmd/cgo				13064	15006	15%
      cmd/compile			27	67	148%
      cmd/compile/internal/amd64	461	869	89%
      cmd/compile/internal/arm	5963	7273	22%
      cmd/compile/internal/arm64	363	657	81%
      cmd/compile/internal/big	7186	8590	20%
      cmd/compile/internal/gc		48242	56234	17%
      cmd/compile/internal/mips64	367	666	81%
      cmd/compile/internal/ppc64	372	721	94%
      cmd/compile/internal/s390x	330	569	72%
      cmd/compile/internal/ssa	30464	35058	15%
      cmd/compile/internal/x86	429	770	79%
      cmd/cover			3984	4731	19%
      cmd/dist			74	154	108%
      cmd/doc				7272	8591	18%
      cmd/expdump			27	71	163%
      cmd/fix				342	419	23%
      cmd/go				8126	9520	17%
      cmd/gofmt			27	70	159%
      cmd/gofmt2			27	69	156%
      cmd/gofmt2/internal/format	702	856	22%
      cmd/gofmt2/internal/lexical	2954	3509	19%
      cmd/gofmt2/internal/parse	6185	7295	18%
      cmd/gofmt2/internal/syntax	3533	4738	34%
      cmd/gofmt2/internal/test	540	615	14%
      cmd/internal/bio		5395	6060	12%
      cmd/internal/gcprog		533	663	24%
      cmd/internal/goobj		1022	1277	25%
      cmd/internal/obj		10951	12825	17%
      cmd/internal/obj/arm		8612	9985	16%
      cmd/internal/obj/arm64		15814	17638	12%
      cmd/internal/obj/mips		10928	12487	14%
      cmd/internal/obj/ppc64		13576	15277	13%
      cmd/internal/obj/s390x		16513	18708	13%
      cmd/internal/obj/x86		21152	23482	11%
      cmd/internal/objfile		14442	16505	14%
      cmd/internal/pprof/commands	1663	1885	13%
      cmd/internal/pprof/driver	9517	10789	13%
      cmd/internal/pprof/fetch	7632	8635	13%
      cmd/internal/pprof/plugin	13150	14809	13%
      cmd/internal/pprof/profile	7004	8248	18%
      cmd/internal/pprof/report	7763	8942	15%
      cmd/internal/pprof/svg		1332	1534	15%
      cmd/internal/pprof/symbolizer	7376	8439	14%
      cmd/internal/pprof/symbolz	6970	7976	14%
      cmd/internal/pprof/tempfile	3645	4093	12%
      cmd/internal/sys		505	619	23%
      cmd/internal/unvendor/golang.org/x/arch/arm/armasm	73951	79188	7%
      cmd/internal/unvendor/golang.org/x/arch/x86/x86asm	10140	11738	16%
      cmd/link			27	64	137%
      cmd/link/internal/amd64		9317	11034	18%
      cmd/link/internal/arm		110	213	94%
      cmd/link/internal/arm64		112	219	96%
      cmd/link/internal/ld		53524	60149	12%
      cmd/link/internal/mips64	113	222	96%
      cmd/link/internal/ppc64		113	220	95%
      cmd/link/internal/s390x		112	219	96%
      cmd/link/internal/x86		110	212	93%
      cmd/nm				27	61	126%
      cmd/objdump			27	68	152%
      cmd/pack			4141	4688	13%
      cmd/pprof			27	67	148%
      cmd/trace			624	842	35%
      cmd/vet				11194	13140	17%
      cmd/vet/internal/whitelist	52	113	117%
      cmd/yacc			1141	1317	15%
      compress/bzip2			2101	2484	18%
      compress/flate			3619	4336	20%
      compress/gzip			6261	7111	14%
      compress/lzw			276	401	45%
      compress/zlib			3630	4158	15%
      container/heap			187	250	34%
      container/list			1370	1506	10%
      container/ring			466	546	17%
      context				3005	3338	11%
      crypto				728	856	18%
      crypto/aes			181	321	77%
      crypto/cipher			744	1163	56%
      crypto/des			220	320	45%
      crypto/dsa			4526	4990	10%
      crypto/ecdsa			5341	5982	12%
      crypto/elliptic			4969	5593	13%
      crypto/hmac			188	250	33%
      crypto/md5			560	706	26%
      crypto/rand			4218	4746	13%
      crypto/rc4			214	321	50%
      crypto/rsa			5648	6355	13%
      crypto/sha1			597	751	26%
      crypto/sha256			228	351	54%
      crypto/sha512			354	484	37%
      crypto/subtle			586	621	6%
      crypto/tls			20909	23438	12%
      crypto/x509			14862	16857	13%
      crypto/x509/pkix		8384	9278	11%
      database/sql			6721	7715	15%
      database/sql/driver		1243	1535	23%
      debug/dwarf			7867	9153	16%
      debug/elf			25479	28025	10%
      debug/gosym			1887	2267	20%
      debug/macho			7222	8846	22%
      debug/pe			6921	8081	17%
      debug/plan9obj			1084	1319	22%
      encoding			217	280	29%
      encoding/ascii85		587	722	23%
      encoding/asn1			1043	1268	22%
      encoding/base32			929	1112	20%
      encoding/base64			1166	1368	17%
      encoding/binary			2168	2410	11%
      encoding/csv			3761	4203	12%
      encoding/gob			11304	12936	14%
      encoding/hex			510	606	19%
      encoding/json			9965	11395	14%
      encoding/pem			202	266	32%
      encoding/xml			11817	13361	13%
      errors				126	170	35%
      expvar				930	1142	23%
      flag				5905	6519	10%
      fmt				1027	1190	16%
      go/ast				12910	15541	20%
      go/build			5460	6173	13%
      go/constant			1645	1816	10%
      go/doc				3107	3882	25%
      go/format			1416	1729	22%
      go/importer			1426	1668	17%
      go/internal/gccgoimporter	1624	2028	25%
      go/internal/gcimporter		2650	3095	17%
      go/parser			6220	7073	14%
      go/printer			1924	2306	20%
      go/scanner			3137	3602	15%
      go/token			3053	3474	14%
      go/types			21793	25561	17%
      hash				234	327	40%
      hash/adler32			465	553	19%
      hash/crc32			668	817	22%
      hash/crc64			630	727	15%
      hash/fnv			1413	1582	12%
      html				76	114	50%
      html/template			14382	16457	14%
      image				10248	11409	11%
      image/color			2247	2562	14%
      image/color/palette		107	169	58%
      image/draw			2313	2494	8%
      image/gif			3079	3450	12%
      image/internal/imageutil	3136	3456	10%
      image/jpeg			2349	2735	16%
      image/png			2404	2695	12%
      index/suffixarray		4978	5596	12%
      internal/race			225	278	24%
      internal/singleflight		551	697	26%
      internal/syscall/windows/sysdll	97	166	71%
      internal/testenv		4488	5052	13%
      internal/trace			1392	1680	21%
      io				2811	3318	18%
      io/ioutil			3988	4467	12%
      log				3532	3907	11%
      log/syslog			4247	4775	12%
      math				3021	4499	49%
      math/big			7250	8456	17%
      math/cmplx			1034	1617	56%
      math/rand			734	885	21%
      mime				1889	2194	16%
      mime/multipart			4313	4849	12%
      mime/quotedprintable		1758	1996	14%
      net				15686	18617	19%
      net/http			42182	47848	13%
      net/http/cgi			19496	21768	12%
      net/http/cookiejar		4615	5248	14%
      net/http/fcgi			17758	19771	11%
      net/http/httptest		26108	29350	12%
      net/http/httputil		20732	23286	12%
      net/http/internal		2195	2497	14%
      net/http/pprof			17596	19545	11%
      net/internal/socktest		1689	2153	27%
      net/mail			4328	4810	11%
      net/rpc				24328	27249	12%
      net/rpc/jsonrpc			11052	12438	13%
      net/smtp			17127	19174	12%
      net/textproto			3705	4329	17%
      net/url				1193	1371	15%
      os				8493	10113	19%
      os/exec				6625	7532	14%
      os/signal			137	236	72%
      os/user				529	761	44%
      path				295	372	26%
      path/filepath			3452	3952	14%
      reflect				5091	6028	18%
      regexp				4848	5585	15%
      regexp/syntax			2590	3076	19%
      runtime				8721	11598	33%
      runtime/cgo			17	17	0%
      runtime/debug			2721	3130	15%
      runtime/internal/atomic		569	704	24%
      runtime/internal/sys		1874	2318	24%
      runtime/pprof			478	582	22%
      runtime/race			18	18	0%
      runtime/trace			95	146	54%
      sort				1052	1215	15%
      strconv				1389	1667	20%
      strings				3372	3772	12%
      sync				946	1371	45%
      sync/atomic			962	1079	12%
      syscall				41574	45613	10%
      testing				6184	7243	17%
      testing/iotest			883	1116	26%
      testing/quick			4659	5443	17%
      text/scanner			2930	3269	12%
      text/tabwriter			2333	2607	12%
      text/template			13335	15274	15%
      text/template/parse		8270	9285	12%
      time				4687	5313	13%
      unicode				3831	4355	14%
      unicode/utf16			530	584	10%
      unicode/utf8			872	946	8%
      vendor/golang.org/x/net/http2/hpack	3386	3970	17%
      
      				1295440	1481566	14%
      orig. textual			4253585	1481566	-65%
      orig. binary			1724071	1481566 -14%
      
      Change-Id: I4177c6511cc57ebe5eb80c89bf3aefc83376ce86
      Reviewed-on: https://go-review.googlesource.com/22096Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
      5c593a32
    • Keith Randall's avatar
      cmd/compile: fix register size for ODOTPTR result · ac8127d7
      Keith Randall authored
      The result of ODOTPTR, as well as a bunch of other ops,
      should be the type of the result, not always a pointer type.
      
      This fixes an amd64p32 bug where we were incorrectly truncating
      a 64-bit slice index to 32 bits, and then barfing on a weird
      load-64-bits-but-then-truncate-to-32-bits op that doesn't exist.
      
      Fixes #15252
      
      Change-Id: Ie62f4315fffd79f233e5449324ccc0879f5ac343
      Reviewed-on: https://go-review.googlesource.com/22094
      Run-TryBot: Keith Randall <khr@golang.org>
      Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      ac8127d7
    • Austin Clements's avatar
      sync/atomic: don't atomically write pointers twice · 7c7081f5
      Austin Clements authored
      sync/atomic.StorePointer (which is implemented in
      runtime/atomic_pointer.go) writes the pointer twice (through two
      completely different code paths, no less). Fix it to only write once.
      
      Change-Id: Id3b2aef9aa9081c2cf096833e001b93d3dd1f5da
      Reviewed-on: https://go-review.googlesource.com/21999
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarMichael Matloob <matloob@golang.org>
      Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
      7c7081f5
    • Austin Clements's avatar
      runtime: make sync_atomic_SwapPointer signature match sync/atomic · 8f6c35de
      Austin Clements authored
      SwapPointer is declared as
      
        func SwapPointer(addr *unsafe.Pointer, new unsafe.Pointer) (old unsafe.Pointer)
      
      in sync/atomic, but defined in the runtime (where it's actually
      implemented) as
      
        func sync_atomic_SwapPointer(ptr unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer
      
      Make ptr a *unsafe.Pointer in the runtime definition to match the type
      in sync/atomic.
      
      Change-Id: I99bab651b995001bbe54f9e790fdef2417ef0e9e
      Reviewed-on: https://go-review.googlesource.com/21998
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarMichael Matloob <matloob@golang.org>
      8f6c35de
    • Keith Randall's avatar
      runtime/internal/sys: better fallback algorithms for intrinsics · 98b6febc
      Keith Randall authored
      Use deBruijn sequences to count low-order zeros.
      Reorg bswap to not use &^, it takes another instruction on x86.
      
      Change-Id: I4a5ed9fd16ee6a279d88c067e8a2ba11de821156
      Reviewed-on: https://go-review.googlesource.com/22084Reviewed-by: 's avatarDavid Chase <drchase@google.com>
      98b6febc
    • Michael Hudson-Doyle's avatar
      cmd/go: deduplicate gccgo afiles by package path, not *Package · 12e3b184
      Michael Hudson-Doyle authored
      This code was fixed a while ago to ensure that xtest and fake packages came
      first on the link line, but golang.org/cl/16775 added --whole-archive ...
      --no-whole-archive around all the .a files and rendered this fix useless.
      
      So, take a different approach and only put one .a file on the linker command
      line for each ImportPath we see while traversing the action graph, not for each
      *Package we see. The way we walk the graph ensures that we'll see the .a files
      that need to be first first.
      
      Change-Id: I137f00f129ccc9fc99f40eee885cc04cc358a62e
      Reviewed-on: https://go-review.googlesource.com/21692Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      12e3b184
    • Michael Hudson-Doyle's avatar
      cmd/go: fix "#cgo pkg-config:" comments with gccgo · e5463f50
      Michael Hudson-Doyle authored
      The unique difficulty of #cgo pkg-config is that the linker flags are recorded
      when the package is compiled but (obviously) must be used when the package is
      linked into an executable -- so the flags need to be stored on disk somewhere.
      As it happens cgo already writes out a _cgo_flags file: nothing uses it
      currently, but this change adds it to the lib$pkg.a file when compiling a
      package, reads it out when linking (and passes a version of the .a file with
      _cgo_flags stripped out of it to the linker). It's all fairly ugly but it works
      and I can't really think of any way of reducing the essential level of
      ugliness.
      
      Fixes #11739
      
      Change-Id: I35621878014e1e107eda77a5b0b23d0240ec5750
      Reviewed-on: https://go-review.googlesource.com/18790
      Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      e5463f50