- 28 Aug, 2017 29 commits
-
-
Josh Bleecher Snyder authored
Passes toolstash-check. Change-Id: Id62bacff13fbd30de62b925d97a4e7bee1c66120 Reviewed-on: https://go-review.googlesource.com/59331 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Rob Pike authored
When given one argument, as in go doc binary.BigEndian doc would search for the package, but when given two, as in go doc binary BigEndian it would not. Fix the inconsistency. Fixes #18697 Fixes #18664 Change-Id: Ib59dc483e8d4f91e6061c77a5ec24d0a50e115f0 Reviewed-on: https://go-review.googlesource.com/59413Reviewed-by: Aliaksandr Valialkin <valyala@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
The assembler barfs on large offsets. Make sure that all the instructions that need to have their offsets in an int32 1) check on any rule that computes offsets for such instructions 2) change their aux fields so the check builder checks it. The assembler also silently misassembled offsets between 1<<31 and 1<<32. Add a check in the assembler to barf on those as well. Fixes #21655 Change-Id: Iebf24bf10f9f37b3ea819ceb7d588251c0f46d7d Reviewed-on: https://go-review.googlesource.com/59630 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Hana Kim authored
This is useful when debugging the tool. Some tweaks on logging: log the webserver address, log.Print instead of log.Printf when possible. Change-Id: Iaf71b6523b40dc13795511784d48eacf0f5a396a Reviewed-on: https://go-review.googlesource.com/59570Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Martin Möhrmann authored
AMD64 with AES support disabled: name old time/op new time/op delta MapPopulate/1 78.0ns ± 1% 75.5ns ± 1% -3.17% (p=0.000 n=10+9) MapPopulate/10 764ns ± 2% 673ns ± 2% -11.91% (p=0.000 n=10+10) MapPopulate/100 9.52µs ± 1% 8.54µs ± 1% -10.37% (p=0.000 n=8+10) MapPopulate/1000 116µs ± 2% 103µs ± 1% -10.40% (p=0.000 n=10+8) MapPopulate/10000 1.01ms ± 1% 0.90ms ± 1% -10.70% (p=0.000 n=10+10) MapPopulate/100000 9.81ms ± 1% 8.67ms ± 2% -11.54% (p=0.000 n=10+10) 386 with AES support disabled: name old time/op new time/op delta MapPopulate/1 95.3ns ± 1% 90.6ns ± 1% -4.95% (p=0.000 n=10+9) MapPopulate/10 983ns ± 2% 912ns ± 1% -7.18% (p=0.000 n=10+10) MapPopulate/100 11.9µs ± 2% 11.2µs ± 1% -6.01% (p=0.000 n=10+10) MapPopulate/1000 140µs ± 1% 131µs ± 1% -6.19% (p=0.000 n=10+10) MapPopulate/10000 1.26ms ± 2% 1.18ms ± 1% -5.93% (p=0.000 n=9+10) MapPopulate/100000 12.1ms ± 2% 11.4ms ± 1% -5.48% (p=0.000 n=10+10) Fixes #21539 Change-Id: Ice128c947c9a6a294800d6a5250d82045eb70b55 Reviewed-on: https://go-review.googlesource.com/59352 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Tom Bergan authored
Fixes #21603 Change-Id: I42fb7ea2dd7f6d6a201171055beaeda68c26b823 Reviewed-on: https://go-review.googlesource.com/59530Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: I0360d294868ec4423e4ae036009fac4e72425c9c Reviewed-on: https://go-review.googlesource.com/59152 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
Maps with indirect values use the generic map routines. Change-Id: Ib211e93f1dacefb988ba3d279f92a13065168079 Reviewed-on: https://go-review.googlesource.com/59135 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
-
Josh Bleecher Snyder authored
Similar to CL 59110. Change-Id: Ia2858541c86a44b105eacbca9a46b1044632c5ca Reviewed-on: https://go-review.googlesource.com/59134 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Josh Bleecher Snyder authored
None of the mapfast key types are indirect. Change-Id: I1fb2682257567ee69504082a6cdad63c99916671 Reviewed-on: https://go-review.googlesource.com/59133 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
-
Josh Bleecher Snyder authored
All of the mapfast key types are reflexive. Change-Id: I8595aed2a9d945cda1b5d08e2067dce0f1c0d585 Reviewed-on: https://go-review.googlesource.com/59132 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
-
Josh Bleecher Snyder authored
Change-Id: I89c3c3b21d7a4acbc49b14a52ac8d9a5861c0c39 Reviewed-on: https://go-review.googlesource.com/59131 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
-
Josh Bleecher Snyder authored
The newly added routines are exact copies of the generic routines, except for the function names and that growWork_fastX calls evacuate_fastX. Actual optimization will happen in subsequent CLs. This is intended to ease reviewing. Change-Id: I52ef7dd40b2bdfc9cba2496544c0604e6e71cf7f Reviewed-on: https://go-review.googlesource.com/59130 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Michael Fraenkel authored
In TimeoutHandler, use a request whose context has been configured with the handler's timeout Fixes #20712 Change-Id: Ie670148f85fdad46841ff29232042309e15665ae Reviewed-on: https://go-review.googlesource.com/46412 Run-TryBot: Tom Bergan <tombergan@google.com> Reviewed-by: Tom Bergan <tombergan@google.com>
-
Keith Randall authored
Just to make it clearer which regexps are positive and which regexps are negative. Change-Id: Ia190e89be28048fcae2491506f552afad90a5f85 Reviewed-on: https://go-review.googlesource.com/59490 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com> Reviewed-by: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ilya Tocar authored
We can rematerialize only ops that have SP or SB as their only argument. There are some ADDQconst(SP) that can be rematerialized, but are spilled/filled instead, so mark addconst as rematerializeable. This shaves ~1kb from go tool. Change-Id: Ib4cf4fe5f2ec9d3d7e5f0f77f1193eba66ca2f08 Reviewed-on: https://go-review.googlesource.com/54393 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Karsten Köhler authored
Change-Id: Ib4883470bd2271e546daea3156d4a48dd873aaa3 Reviewed-on: https://go-review.googlesource.com/57670Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
When running multiple iOS builds on the same host, GOIOS_DEVICE_ID is used to distinguish the devices. To improve support, - Only restart the particular device when invoking iostest.bash with the -restart flag. - Make the exec wrapper lock file per-device. For the iOS builder. Change-Id: Id6f222981f25036399a43c3202a393dba89d87cb Reviewed-on: https://go-review.googlesource.com/57970 Run-TryBot: Elias Naur <elias.naur@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
David du Colombier authored
The SSA compiler currently generates MOVOstore instructions to optimize 16 bytes moves on AMD64 architecture. However, we can't use the MOVOstore instruction on Plan 9, because floating point operations are not allowed in the note handler. We rely on the useSSE flag to disable the use of the MOVOstore instruction on Plan 9 and replace it by two MOVQstore instructions. Fixes #21625 Change-Id: Idfefcceadccafe1752b059b5fe113ce566c0e71c Reviewed-on: https://go-review.googlesource.com/59171 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
-
Artyom Pervukhin authored
Closes #21637 Change-Id: Icc3528572ea2a25e62757cc8fbbb9c3fa96a78b2 Reviewed-on: https://go-review.googlesource.com/59350Reviewed-by: Tom Bergan <tombergan@google.com>
-
Ben Shi authored
Like the indexed MOVW (MOVWloadidx/MOVWstoreidx) used in current ARM backend, the indexed MOVB/MOVBU/MOVH/MOVHU can also be used to generate further optimized ARM code. My patch implements this optimization. Here are some contrast test results against the original go compiler. 1. The total size of all .a files in pkg/ shrinks by 0.03%. 2. The compilecmp benchmark shows a little decline. name old time/op new time/op delta Template 2.35s ± 1% 2.37s ± 3% +0.94% (p=0.006 n=19+19) Unicode 1.33s ± 3% 1.33s ± 2% ~ (p=0.158 n=20+18) GoTypes 7.86s ± 2% 7.84s ± 1% ~ (p=0.284 n=19+18) Compiler 37.5s ± 1% 37.7s ± 2% ~ (p=0.101 n=20+19) SSA 83.4s ± 2% 83.6s ± 2% ~ (p=0.231 n=20+20) Flate 1.46s ± 2% 1.45s ± 1% ~ (p=0.097 n=20+17) GoParser 1.86s ± 2% 1.86s ± 4% ~ (p=0.738 n=20+20) Reflect 5.10s ± 1% 5.11s ± 1% ~ (p=0.290 n=20+18) Tar 1.78s ± 2% 1.77s ± 2% ~ (p=0.166 n=19+20) XML 2.61s ± 2% 2.61s ± 2% ~ (p=0.665 n=19+19) [Geo mean] 4.67s 4.68s +0.16% name old user-time/op new user-time/op delta Template 2.79s ± 3% 2.80s ± 2% ~ (p=0.662 n=20+20) Unicode 1.62s ± 3% 1.64s ± 4% ~ (p=0.252 n=20+20) GoTypes 9.58s ± 2% 9.62s ± 2% ~ (p=0.250 n=20+20) Compiler 46.2s ± 1% 46.2s ± 1% ~ (p=0.602 n=20+19) SSA 108s ± 1% 108s ± 2% ~ (p=0.242 n=18+20) Flate 1.69s ± 3% 1.69s ± 4% ~ (p=0.470 n=20+20) GoParser 2.16s ± 3% 2.20s ± 4% +1.70% (p=0.005 n=19+20) Reflect 6.02s ± 2% 6.02s ± 2% ~ (p=0.700 n=20+17) Tar 2.11s ± 2% 2.11s ± 3% ~ (p=0.480 n=18+20) XML 3.07s ± 2% 3.11s ± 4% +1.50% (p=0.043 n=20+20) [Geo mean] 5.61s 5.64s +0.55% name old text-bytes new text-bytes delta HelloSize 586kB ± 0% 586kB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 5.46kB ± 0% 5.46kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 72.9kB ± 0% 72.9kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.03MB ± 0% 1.03MB ± 0% ~ (all equal) 3. The go1 benchmark shows improvement totally, and even more than 10% improvement in the test case Revcomp. name old time/op new time/op delta BinaryTree17-4 42.0s ± 1% 41.5s ± 1% -1.32% (p=0.000 n=39+40) Fannkuch11-4 24.1s ± 1% 23.6s ± 0% -2.38% (p=0.000 n=40+40) FmtFprintfEmpty-4 843ns ± 0% 839ns ± 1% -0.46% (p=0.000 n=33+40) FmtFprintfString-4 1.44µs ± 1% 1.37µs ± 1% -5.48% (p=0.000 n=40+35) FmtFprintfInt-4 1.44µs ± 1% 1.41µs ± 2% -1.50% (p=0.000 n=40+40) FmtFprintfIntInt-4 2.07µs ± 1% 2.06µs ± 0% -0.78% (p=0.000 n=40+40) FmtFprintfPrefixedInt-4 2.50µs ± 1% 2.33µs ± 1% -6.85% (p=0.000 n=40+40) FmtFprintfFloat-4 4.36µs ± 1% 4.34µs ± 0% -0.39% (p=0.017 n=40+40) FmtManyArgs-4 8.11µs ± 0% 8.00µs ± 0% -1.37% (p=0.000 n=40+40) GobDecode-4 105ms ± 2% 103ms ± 2% -2.17% (p=0.000 n=39+39) GobEncode-4 90.1ms ± 2% 88.6ms ± 1% -1.67% (p=0.000 n=40+39) Gzip-4 4.18s ± 1% 4.09s ± 1% -2.03% (p=0.000 n=40+40) Gunzip-4 608ms ± 1% 603ms ± 1% -0.86% (p=0.000 n=40+34) HTTPClientServer-4 674µs ± 3% 661µs ± 2% -1.82% (p=0.000 n=40+39) JSONEncode-4 256ms ± 1% 243ms ± 0% -5.11% (p=0.000 n=39+31) JSONDecode-4 915ms ± 1% 904ms ± 1% -1.18% (p=0.000 n=40+36) Mandelbrot200-4 49.2ms ± 0% 49.3ms ± 0% ~ (p=0.254 n=34+40) GoParse-4 46.9ms ± 2% 46.9ms ± 1% ~ (p=0.737 n=40+39) RegexpMatchEasy0_32-4 1.28µs ± 1% 1.27µs ± 1% -0.71% (p=0.000 n=40+40) RegexpMatchEasy0_1K-4 7.86µs ± 4% 7.67µs ± 4% -2.46% (p=0.000 n=38+40) RegexpMatchEasy1_32-4 1.28µs ± 1% 1.28µs ± 1% -0.54% (p=0.000 n=40+40) RegexpMatchEasy1_1K-4 10.4µs ± 2% 10.3µs ± 2% -0.88% (p=0.003 n=40+39) RegexpMatchMedium_32-4 2.05µs ± 0% 2.04µs ± 0% -0.34% (p=0.000 n=40+33) RegexpMatchMedium_1K-4 541µs ± 1% 535µs ± 1% -1.02% (p=0.000 n=40+38) RegexpMatchHard_32-4 29.3µs ± 1% 29.1µs ± 1% -0.51% (p=0.000 n=40+40) RegexpMatchHard_1K-4 881µs ± 1% 871µs ± 1% -1.15% (p=0.000 n=40+40) Revcomp-4 81.7ms ± 2% 67.5ms ± 2% -17.37% (p=0.000 n=39+39) Template-4 1.05s ± 1% 1.08s ± 2% +3.67% (p=0.000 n=40+40) TimeParse-4 7.24µs ± 1% 7.09µs ± 1% -2.13% (p=0.000 n=40+40) TimeFormat-4 13.2µs ± 1% 13.1µs ± 0% -0.31% (p=0.007 n=40+31) [Geo mean] 733µs 718µs -2.03% name old speed new speed delta GobDecode-4 7.28MB/s ± 2% 7.44MB/s ± 2% +2.23% (p=0.000 n=39+39) GobEncode-4 8.52MB/s ± 2% 8.67MB/s ± 1% +1.70% (p=0.000 n=40+39) Gzip-4 4.65MB/s ± 1% 4.74MB/s ± 1% +1.94% (p=0.000 n=37+40) Gunzip-4 31.9MB/s ± 1% 32.2MB/s ± 1% +0.90% (p=0.000 n=40+36) JSONEncode-4 7.57MB/s ± 1% 7.98MB/s ± 0% +5.41% (p=0.000 n=40+31) JSONDecode-4 2.12MB/s ± 1% 2.15MB/s ± 1% +1.23% (p=0.000 n=40+40) GoParse-4 1.23MB/s ± 1% 1.23MB/s ± 1% ~ (p=0.769 n=39+40) RegexpMatchEasy0_32-4 25.0MB/s ± 1% 25.2MB/s ± 1% +0.71% (p=0.000 n=40+40) RegexpMatchEasy0_1K-4 130MB/s ± 5% 134MB/s ± 4% +2.53% (p=0.000 n=38+40) RegexpMatchEasy1_32-4 24.9MB/s ± 1% 25.1MB/s ± 1% +0.55% (p=0.000 n=40+40) RegexpMatchEasy1_1K-4 98.5MB/s ± 2% 99.4MB/s ± 2% +0.88% (p=0.003 n=40+39) RegexpMatchMedium_32-4 490kB/s ± 0% 490kB/s ± 0% ~ (all equal) RegexpMatchMedium_1K-4 1.89MB/s ± 1% 1.91MB/s ± 1% +1.02% (p=0.000 n=40+38) RegexpMatchHard_32-4 1.10MB/s ± 1% 1.10MB/s ± 0% +0.41% (p=0.000 n=40+33) RegexpMatchHard_1K-4 1.16MB/s ± 1% 1.17MB/s ± 1% +1.21% (p=0.000 n=40+40) Revcomp-4 31.1MB/s ± 2% 37.6MB/s ± 2% +21.03% (p=0.000 n=39+39) Template-4 1.86MB/s ± 1% 1.79MB/s ± 1% -3.51% (p=0.000 n=40+38) [Geo mean] 6.66MB/s 6.80MB/s +2.13% fixes #21492 Change-Id: Ia26e7ca393f0a5f31de240e8ff9a220453ca7e0d Reviewed-on: https://go-review.googlesource.com/58450Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matej Baćo authored
Current documentation lacks simple examples for functions Regexp.Expand and Regexp.ExpandString whose usage is unclear from description alone. This commit adds examples that demonstrate usage in practical way. Fixes #21649 Change-Id: I7b2c06c8ab747f69a6578f0595bf0f3c742ac479 Reviewed-on: https://go-review.googlesource.com/59470Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Wei Xiao authored
Fixes #19157 Change-Id: Ieea286e8dc03929c3645f3113c33df569f8e26f3 Reviewed-on: https://go-review.googlesource.com/58930Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Daniel Martí authored
Most of these are return values that were part of a receiving parameter, so they're still accessible. A few others are not, but those have never had a use. Found with github.com/mvdan/unparam, after Kevin Burke's suggestion that the tool should also warn about unused result parameters. Change-Id: Id8b5ed89912a99db22027703a88bd94d0b292b8b Reviewed-on: https://go-review.googlesource.com/55910 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Hiroshi Ioka authored
* use bool instead of int if it's adequate. * remove blank lines. Change-Id: Ic4a5644a33ed9fc7ce388ef8ba15f1732446fcfc Reviewed-on: https://go-review.googlesource.com/59375 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: I9882488e69565dc9da6814fefbdba3621daf74fe Reviewed-on: https://go-review.googlesource.com/59332 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com>
-
Ulrich Kunitz authored
The PKCS #1 v2.2 document has been moved to an EMC website with a new URL. This CL updates the reference to the document to the new URL. The new URL is referenced under https://en.wikipedia.org/wiki/PKCS_1 Fixes #21642 Change-Id: Ib8738b0c4c3bb9ec427bebea20c4aacd607ba0db Reviewed-on: https://go-review.googlesource.com/59351Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Rob Pike authored
This has been supported since Go 1 and there's even a test for it. The documentation was missing. Fixes #21409. Change-Id: I5813488f6a98c1b4506c239e968d43344b91be12 Reviewed-on: https://go-review.googlesource.com/59412Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Dmitri Shuralyov authored
The IsMetaPackage function was made exported when it was moved from cmd/go to cmd/go/internal/load in CL 36196. Its documentation wasn't updated accordingly. This change fixes that, resolving a golint issue. Updates #18653. Change-Id: Icf89461000754d0f09e6617b11c838e4c050d5a6 Reviewed-on: https://go-review.googlesource.com/59430Reviewed-by: Dave Cheney <dave@cheney.net>
-
- 27 Aug, 2017 1 commit
-
-
Hiroshi Ioka authored
Change-Id: If27f7fbf94ede6f9a57f2520aaf75e6506e0b3f8 Reviewed-on: https://go-review.googlesource.com/59374 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
- 26 Aug, 2017 2 commits
-
-
Josh Bleecher Snyder authored
One example of a heavily-used zero-size value is encoding/binary.BigEndian. Change-Id: I8e873c447e154ab2ca61b7315df774693891270c Reviewed-on: https://go-review.googlesource.com/59330 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Daniel Martí authored
Went mainly for the ones that make no sense, such as the ones mid-sentence or after commas. Change-Id: Ie245d2c19cc7428a06295635cf6a9482ade25ff0 Reviewed-on: https://go-review.googlesource.com/57293Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 25 Aug, 2017 8 commits
-
-
Joe Tsai authored
Many aspects of the package is woefully undocumented. With the recent flurry of improvements, the package is now at feature parity with the GNU and TAR tools. Thoroughly all of the public API and perform some minor stylistic cleanup in some code segments. Change-Id: Ic892fd72c587f30dfe91d1b25b88c9c8048cc389 Reviewed-on: https://go-review.googlesource.com/59210 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Joe Tsai authored
The PAX specification says the following: <<< 'g' represents global extended header records for the following files in the archive. The format of these extended header records shall be as described in pax Extended Header. Each value shall affect all subsequent files that do not override that value in their own extended header record and until another global extended header record is reached that provides another value for the same field. >>> This CL adds support for parsing and composing global PAX records, but intentionally does not provide support for automatically persisting the global state across files. Changes made: * When Reader encounters a TypeXGlobalRecord header, it parses the PAX records and returns them to the user ad-verbatim. Reader does not store them in its state, ensuring it has no effect on future Next calls. * When Writer receives a TypeXGlobalRecord header, it writes the PAX records to the archive ad-verbatim. It does not store them in its state, ensuring it has no effect on future WriteHeader calls. * The restriction regarding empty record values is lifted since this value is used to represent deletion in global headers. Why provide raw support only: * Some archives in the wild have a global header section (often empty) and it is the user's responsibility to manually read and discard it's body. The logic added here allows users to more easily skip over these sections. * For users that do care about global headers, having access to the raw records allows them to implement the functionality of global headers themselves and manually persist the global state across files. * We can still upgrade to a full implementation in the future. Why we don't provide full support: * Even though the PAX specification describes their operation in detail, both the GNU and BSD tar tools (which are the most common implementations) do not have a consistent interpretation of many details. * Global headers were a controversial feature in PAX, by admission of the specification itself: <<< The concept of a global extended header (typeflag g) was controversial. The typeflag g global headers should not be used with interchange media that could suffer partial data loss in transporting the archive. >>> * Having state persist from entry-to-entry complicates the implementation for a feature that is not widely used and not well supported. Change-Id: I1d904cacc2623ddcaa91525a5470b7dbe226c7e8 Reviewed-on: https://go-review.googlesource.com/59190Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
-
Hiroshi Ioka authored
Change-Id: I6cb0ed9b726da34106ba239b57e2da732a8e1b71 Reviewed-on: https://go-review.googlesource.com/50730Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by: Avelino <t@avelino.xxx>
-
Daniel Martí authored
Otherwise, if there are any parallel tests, it will hang and panic with "all goroutines are asleep - deadlock!". Do not use flag.Uint to handle the error for us because we also want to error on N==0, and because it would make setting the default to GOMAXPROCS(0) more difficult, since it's an int. Check for it right after flag.Parse, and mimic flag errors by printing the usage and returning exit code 2. Fixes #20542. Change-Id: I0c9d4587f83d406a8f5e42ed74e40be46d639ffb Reviewed-on: https://go-review.googlesource.com/54150 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Meir Fischer authored
This addresses the case of a -timeout panic, but not the more general case of a signal arriving. See CL 48370 and CL 44352 for recent difficulties in that area. "-timeout" here means flag usage to distinguish from the default timeout termination which uses signals. Fixes #19394 Change-Id: I5452d5422c0c080e940cbcc8c6606049975268c6 Reviewed-on: https://go-review.googlesource.com/48491Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Artyom Pervukhin authored
Closes #21519 Change-Id: I1247e9435de93aae7e4db2b6e8e5be1b010c296b Reviewed-on: https://go-review.googlesource.com/56832Reviewed-by: Avelino <t@avelino.xxx> Reviewed-by: Adam Langley <agl@golang.org>
-
Joe Tsai authored
This CL adds the following new publicly visible API: type Header struct { ...; PAXRecords map[string]string } The new Header.PAXRecords field is a map of all PAX extended header records. We suggest (but do not enforce) that users use VENDOR-prefixed keys according to the following in the PAX specification: <<< The standard developers have reserved keyword name space for vendor extensions. It is suggested that the format to be used is: VENDOR.keyword where VENDOR is the name of the vendor or organization in all uppercase letters. >>> When reading, the Header.PAXRecords is populated with all PAX records encountered so far, including basic ones (e.g., "path", "mtime", etc). When writing, the fields of Header will be merged into PAXRecords, overwriting any records that may conflict. Since PAXRecords is a more expressive feature than Xattrs and is entirely a superset of Xattrs, we mark Xattrs as deprecated, and steer users towards the new PAXRecords API. The issue has a discussion about adding a Header.SetPAXRecord method to help validate records and keep the Header fields in sync. However, we do not include that in this CL since that helper method can always be added in the future. There is no support for global records. Fixes #14472 Change-Id: If285a52749acc733476cf75a2c7ad15bc1542071 Reviewed-on: https://go-review.googlesource.com/58390 Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Joe Tsai authored
Add this early in the cycle so that we can start regression testing of the master toolchain. Change-Id: Ida3ccad6e9642648f489babd12877fc8a5eca07a Reviewed-on: https://go-review.googlesource.com/59151Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-