1. 22 Oct, 2015 13 commits
    • Robert Griesemer's avatar
      cmd/link/internal/ld: export data may be marked with $$ or $$B · 28ef4c38
      Robert Griesemer authored
      Preparation for dealing with binary export format. Accept $$B
      as marker for export data. For now, skip that data if found.
      
      Change-Id: I464ba22aaedcf349725379d91070fc900d93b7a2
      Reviewed-on: https://go-review.googlesource.com/16222Reviewed-by: default avatarChris Manghane <cmang@golang.org>
      28ef4c38
    • Robert Griesemer's avatar
      cmd/internal/goobj: permit 0 bytes in export data (prep. for new export format) · 4e777c8e
      Robert Griesemer authored
      Change-Id: Ida9a82a5420a41ef656388866a1cf8fadf12ccc6
      Reviewed-on: https://go-review.googlesource.com/16220Reviewed-by: default avatarChris Manghane <cmang@golang.org>
      4e777c8e
    • Robert Griesemer's avatar
      cmd/compile/internal/gc: fixed comments (cosmetic change) · 3319ea98
      Robert Griesemer authored
      Change-Id: I9cbbfcf55ce3cccb6f14b9ffe6777567dcdad9c9
      Reviewed-on: https://go-review.googlesource.com/16179Reviewed-by: default avatarChris Manghane <cmang@golang.org>
      3319ea98
    • Austin Clements's avatar
      runtime: add pcvalue cache to improve stack scan speed · beedb1ec
      Austin Clements authored
      The cost of scanning large stacks is currently dominated by the time
      spent looking up and decoding the pcvalue table. However, large stacks
      are usually large not because they contain calls to many different
      functions, but because they contain many calls to the same, small set
      of recursive functions. Hence, walking large stacks tends to make the
      same pcvalue queries many times.
      
      Based on this observation, this commit adds a small, very simple, and
      fast cache in front of pcvalue lookup. We thread this cache down from
      operations that make many pcvalue calls, such as gentraceback, stack
      scanning, and stack adjusting.
      
      This simple cache works well because it has minimal overhead when it's
      not effective. I also tried a hashed direct-map cache, CLOCK-based
      replacement, round-robin replacement, and round-robin with lookups
      disabled until there had been at least 16 probes, but none of these
      approaches had obvious wins over the random replacement policy in this
      commit.
      
      This nearly doubles the overall performance of the deep stack test
      program from issue #10898:
      
      name        old time/op  new time/op  delta
      Issue10898   16.5s ±12%    9.2s ±12%  -44.37%  (p=0.008 n=5+5)
      
      It's a very slight win on the garbage benchmark:
      
      name              old time/op  new time/op  delta
      XBenchGarbage-12  4.92ms ± 1%  4.89ms ± 1%  -0.75%  (p=0.000 n=18+19)
      
      It's a wash (but doesn't harm performance) on the go1 benchmarks,
      which don't have particularly deep stacks:
      
      name                      old time/op    new time/op    delta
      BinaryTree17-12              3.11s ± 2%     3.20s ± 3%  +2.83%  (p=0.000 n=17+20)
      Fannkuch11-12                2.51s ± 1%     2.51s ± 1%  -0.22%  (p=0.034 n=19+18)
      FmtFprintfEmpty-12          50.8ns ± 3%    50.6ns ± 2%    ~     (p=0.793 n=20+20)
      FmtFprintfString-12          174ns ± 0%     174ns ± 1%  +0.17%  (p=0.048 n=15+20)
      FmtFprintfInt-12             177ns ± 0%     165ns ± 1%  -6.99%  (p=0.000 n=17+19)
      FmtFprintfIntInt-12          283ns ± 1%     284ns ± 0%  +0.22%  (p=0.000 n=18+15)
      FmtFprintfPrefixedInt-12     243ns ± 1%     244ns ± 1%  +0.40%  (p=0.000 n=20+19)
      FmtFprintfFloat-12           318ns ± 0%     319ns ± 0%  +0.27%  (p=0.001 n=19+20)
      FmtManyArgs-12              1.12µs ± 0%    1.14µs ± 0%  +1.74%  (p=0.000 n=19+20)
      GobDecode-12                8.69ms ± 0%    8.73ms ± 1%  +0.46%  (p=0.000 n=18+18)
      GobEncode-12                6.64ms ± 1%    6.61ms ± 1%  -0.46%  (p=0.000 n=20+20)
      Gzip-12                      323ms ± 2%     319ms ± 1%  -1.11%  (p=0.000 n=20+20)
      Gunzip-12                   42.8ms ± 0%    42.9ms ± 0%    ~     (p=0.158 n=18+20)
      HTTPClientServer-12         63.3µs ± 1%    63.1µs ± 1%  -0.35%  (p=0.011 n=20+20)
      JSONEncode-12               16.9ms ± 1%    17.3ms ± 1%  +2.84%  (p=0.000 n=19+20)
      JSONDecode-12               59.7ms ± 0%    58.5ms ± 0%  -2.05%  (p=0.000 n=19+17)
      Mandelbrot200-12            3.92ms ± 0%    3.91ms ± 0%  -0.16%  (p=0.003 n=19+19)
      GoParse-12                  3.79ms ± 2%    3.75ms ± 2%  -0.91%  (p=0.005 n=20+20)
      RegexpMatchEasy0_32-12       102ns ± 1%     101ns ± 1%  -0.80%  (p=0.001 n=14+20)
      RegexpMatchEasy0_1K-12       337ns ± 1%     346ns ± 1%  +2.90%  (p=0.000 n=20+19)
      RegexpMatchEasy1_32-12      84.4ns ± 2%    84.3ns ± 2%    ~     (p=0.743 n=20+20)
      RegexpMatchEasy1_1K-12       502ns ± 1%     505ns ± 0%  +0.64%  (p=0.000 n=20+20)
      RegexpMatchMedium_32-12      133ns ± 1%     132ns ± 1%  -0.85%  (p=0.000 n=20+19)
      RegexpMatchMedium_1K-12     40.1µs ± 1%    39.8µs ± 1%  -0.77%  (p=0.000 n=18+18)
      RegexpMatchHard_32-12       2.08µs ± 1%    2.07µs ± 1%  -0.55%  (p=0.001 n=18+19)
      RegexpMatchHard_1K-12       62.4µs ± 1%    62.0µs ± 1%  -0.74%  (p=0.000 n=19+19)
      Revcomp-12                   545ms ± 2%     545ms ± 3%    ~     (p=0.771 n=19+20)
      Template-12                 73.7ms ± 1%    72.0ms ± 0%  -2.33%  (p=0.000 n=20+18)
      TimeParse-12                 358ns ± 1%     351ns ± 1%  -2.07%  (p=0.000 n=20+20)
      TimeFormat-12                369ns ± 1%     356ns ± 0%  -3.53%  (p=0.000 n=20+18)
      [Geo mean]                  63.5µs         63.2µs       -0.41%
      
      name                      old speed      new speed      delta
      GobDecode-12              88.3MB/s ± 0%  87.9MB/s ± 0%  -0.43%  (p=0.000 n=18+17)
      GobEncode-12               116MB/s ± 1%   116MB/s ± 1%  +0.47%  (p=0.000 n=20+20)
      Gzip-12                   60.2MB/s ± 2%  60.8MB/s ± 1%  +1.13%  (p=0.000 n=20+20)
      Gunzip-12                  453MB/s ± 0%   453MB/s ± 0%    ~     (p=0.160 n=18+20)
      JSONEncode-12              115MB/s ± 1%   112MB/s ± 1%  -2.76%  (p=0.000 n=19+20)
      JSONDecode-12             32.5MB/s ± 0%  33.2MB/s ± 0%  +2.09%  (p=0.000 n=19+17)
      GoParse-12                15.3MB/s ± 2%  15.4MB/s ± 2%  +0.92%  (p=0.004 n=20+20)
      RegexpMatchEasy0_32-12     311MB/s ± 1%   314MB/s ± 1%  +0.78%  (p=0.000 n=15+19)
      RegexpMatchEasy0_1K-12    3.04GB/s ± 1%  2.95GB/s ± 1%  -2.90%  (p=0.000 n=19+19)
      RegexpMatchEasy1_32-12     379MB/s ± 2%   380MB/s ± 2%    ~     (p=0.779 n=20+20)
      RegexpMatchEasy1_1K-12    2.04GB/s ± 1%  2.02GB/s ± 0%  -0.62%  (p=0.000 n=20+20)
      RegexpMatchMedium_32-12   7.46MB/s ± 1%  7.53MB/s ± 1%  +0.86%  (p=0.000 n=20+19)
      RegexpMatchMedium_1K-12   25.5MB/s ± 1%  25.7MB/s ± 1%  +0.78%  (p=0.000 n=18+18)
      RegexpMatchHard_32-12     15.4MB/s ± 1%  15.5MB/s ± 1%  +0.62%  (p=0.000 n=19+19)
      RegexpMatchHard_1K-12     16.4MB/s ± 1%  16.5MB/s ± 1%  +0.82%  (p=0.000 n=20+19)
      Revcomp-12                 466MB/s ± 2%   466MB/s ± 3%    ~     (p=0.765 n=19+20)
      Template-12               26.3MB/s ± 1%  27.0MB/s ± 0%  +2.38%  (p=0.000 n=20+18)
      [Geo mean]                97.8MB/s       98.0MB/s       +0.23%
      
      Change-Id: I281044ae0b24990ba46487cacbc1069493274bc4
      Reviewed-on: https://go-review.googlesource.com/13614Reviewed-by: default avatarKeith Randall <khr@golang.org>
      beedb1ec
    • Joel Sing's avatar
      net/http/httptest: fix comment regarding certificate expiry · 46630ecd
      Joel Sing authored
      In earlier versions of Go, times were only encoded as an ASN.1 UTCTIME and
      crypto/tls/generate_cert.go limited times to the maximum UTCTIME value.
      Revision 050b60a3 added support for ASN.1 GENERALIZEDTIME, allowing larger
      time values to be represented (per RFC 5280).
      
      As a result, when the httptest certificate was regenerated in revision
      9b2d84ef, the Not After date changed to Jan 29 16:00:00 2084 GMT. Update
      the comment to reflect this.
      
      Change-Id: I1bd66e011f2749f9372b5c7506f52ea34e264ce9
      Reviewed-on: https://go-review.googlesource.com/16193Reviewed-by: default avatarAdam Langley <agl@golang.org>
      46630ecd
    • Matthew Dempsky's avatar
      runtime: add mSpanList type to represent lists of mspans · 1652a2c3
      Matthew Dempsky authored
      This CL introduces a new mSpanList type to replace the empty mspan
      variables that were previously used as list heads.
      
      To be type safe, the previous circular linked list data structure is
      now a tail queue instead.  One complication of this is
      mSpanList_Remove needs to know the list a span is being removed from,
      but this appears to be computable in all circumstances.
      
      As a temporary sanity check, mSpanList_Insert and mSpanList_InsertBack
      record the list that an mspan has been inserted into so that
      mSpanList_Remove can verify that the correct list was specified.
      
      Whereas mspan is 112 bytes on amd64, mSpanList is only 16 bytes.  This
      shrinks the size of mheap from 50216 bytes to 12584 bytes.
      
      Change-Id: I8146364753dbc3b4ab120afbb9c7b8740653c216
      Reviewed-on: https://go-review.googlesource.com/15906
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      Reviewed-by: default avatarAustin Clements <austin@google.com>
      1652a2c3
    • Aaron Jacobs's avatar
      runtime: remove unused printpc and printbyte functions · 151f4ec9
      Aaron Jacobs authored
      Change-Id: I40e338f6b445ca72055fc9bac0f09f0dca904e3a
      Reviewed-on: https://go-review.googlesource.com/16191Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      151f4ec9
    • Brad Fitzpatrick's avatar
      os/exec: make Cmd.Output include stderr in ExitError · c4fa25f4
      Brad Fitzpatrick authored
      Change-Id: I3c6649d2f2521ab0843b13308569867d2e5f02da
      Reviewed-on: https://go-review.googlesource.com/11415Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      c4fa25f4
    • Alex Brainman's avatar
      path/filepath: test EvalSymlinks returns canonical path on windows · 72193c98
      Alex Brainman authored
      When you create C:\A.TXT file on windows, you can open it as c:\a.txt.
      EvalSymlinks("c:\a.txt") returns C:\A.TXT. This is all EvalSymlinks
      did in the past, but recently symlinks functionality been implemented on
      some Windows version (where symlinks are supported). So now EvalSymlinks
      handles both: searching for file canonical name and resolving symlinks.
      
      Unfortunately TestEvalSymlinks has not been adjusted properly. The test
      tests either canonical paths or symlinks, but not both. This CL separates
      canonical paths tests into new TestEvalSymlinksCanonicalNames, so all
      functionality is covered. Tests are simplified somewhat too.
      
      Also remove EvalSymlinksAbsWindowsTests - it seems not used anywhere.
      
      Change-Id: Id12e9f1441c1e30f15c523b250469978e4511a84
      Reviewed-on: https://go-review.googlesource.com/14412Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      72193c98
    • Matthew Dempsky's avatar
      runtime: prune some dead variables · 5a68eb9f
      Matthew Dempsky authored
      Change-Id: I7a1c3079b433c4e30d72fb7d59f9594e0d5efe47
      Reviewed-on: https://go-review.googlesource.com/16178
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      5a68eb9f
    • Matthew Dempsky's avatar
      runtime: change fixalloc's chunk field to unsafe.Pointer · 29330c11
      Matthew Dempsky authored
      It's never used as a *byte anyway, so might as well just make it an
      unsafe.Pointer instead.
      
      Change-Id: I68ee418781ab2fc574eeac0498f2515b5561b7a8
      Reviewed-on: https://go-review.googlesource.com/16175
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      29330c11
    • Shenghou Ma's avatar
      runtime: fix typos · 1948aef6
      Shenghou Ma authored
      Change-Id: Iffc25fc80452baf090bf8ef15ab798cfaa120b8e
      Reviewed-on: https://go-review.googlesource.com/16154Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      1948aef6
    • Matthew Dempsky's avatar
      runtime: split plan9 and solaris's m fields into new embedded mOS type · 58e3ae2f
      Matthew Dempsky authored
      Reduces the size of m by ~8% on linux/amd64 (1040 bytes -> 960 bytes).
      
      There are also windows-specific fields, but they're currently
      referenced in OS-independent source files (but only when
      GOOS=="windows").
      
      Change-Id: I13e1471ff585ccced1271f74209f8ed6df14c202
      Reviewed-on: https://go-review.googlesource.com/16173
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      58e3ae2f
  2. 21 Oct, 2015 22 commits
  3. 20 Oct, 2015 5 commits