- 31 Oct, 2016 26 commits
-
-
Dhananjay Nakrani authored
typecheckcomplit nils out node's type, upon finding new errors. This hides new errors in children's node as well as the type info of current node. This change fixes that. Fixes #17645. Change-Id: Ib473291f31c7e8fa0307cb1d494e0c112ddd3583 Reviewed-on: https://go-review.googlesource.com/32324Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
Currently, assists can only perform heap marking jobs. However, at the beginning of GC, there are only root jobs and no heap marking jobs. As a result, there's often a period at the beginning of a GC cycle where no goroutine has accumulated assist credit, but at the same time it can't get any credit because there are no heap marking jobs for it to do yet. As a result, many goroutines often block on the assist queue at the very beginning of the GC cycle. This commit fixes this by allowing assists to perform root marking jobs. The tricky part of this (and the reason we haven't done this before) is that stack scanning jobs can lead to deadlocks if the goroutines performing the stack scanning are themselves non-preemptible, since two non-preemptible goroutines may try to scan each other. To address this, we use the same insight d6625caf used to simplify the mark worker stack scanning: as long as we're careful with the stacks and only drain jobs while on the system stack, we can put the goroutine into a preemptible state while we drain jobs. This means an assist's user stack can be scanned while it continues to do work. This reduces the rate of assist blocking in the x/benchmarks HTTP benchmark by a factor of 3 and all remaining blocking happens towards the *end* of the GC cycle, when there may genuinely not be enough work to go around. Ideally, assists would get credit for working on root jobs. Currently they do not; however, this change prioritizes heap work over root jobs in assists, so they're likely to mostly perform heap work. In contrast with mark workers, for assists, the root jobs act only as a backstop to create heap work when there isn't enough heap work. Fixes #15361. Change-Id: If6e169863e4ad75710b0c8dc00f6125b41e9a595 Reviewed-on: https://go-review.googlesource.com/32432Reviewed-by:
Rick Hudson <rlh@golang.org>
-
Austin Clements authored
This lifts the part of gcAssistAlloc that runs on the system stack to its own function in preparation for letting assists perform root jobs (notably stack scanning). This makes it easy to see that there are no references to the user stack once we've entered gcAssistAlloc1, which means it's safe to shrink the stack while in gcAssistAlloc1. This does not yet make assists perform root jobs, so it's not actually possible for the stack to shrink yet. That will happen in the next commit. The code in gcAssistAlloc1 is identical to the code that's currently passed in a closure to systemstack with one exception. Currently, we set the "completed" variable in the enclosing scope to indicate that the assist completed the mark phase. This is exactly the sort of cross-stack reference lifting this function is meant to prevent. We replace this variable with setting gp.param to nil or non-nil to indicate the completion status. Updates #15361. Change-Id: Iba7cfb758c781070a441aea86c0117b399a24dbd Reviewed-on: https://go-review.googlesource.com/32431 TryBot-Result: Gobot Gobot <gobot@golang.org> Run-TryBot: Austin Clements <austin@google.com> Reviewed-by:
Rick Hudson <rlh@golang.org>
-
Robert Griesemer authored
Change-Id: I113ea712838511ee823375d9ea059089195414f5 Reviewed-on: https://go-review.googlesource.com/32449 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Jaana Burcu Dogan authored
Fixes #16910. Change-Id: I0e97e88bee0361cd3621cacd1d4b84e6e42af718 Reviewed-on: https://go-review.googlesource.com/32424Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
Change-Id: Iba5cfa033483b843dbd3681ffad50b117cced4a7 Reviewed-on: https://go-review.googlesource.com/32448Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Dhananjay Nakrani authored
Previously, on encountering Func.Nname.Type == nil, typecheckfunc() returned without initializing Decldepth for that func. This causes typecheckclosure() to fatal. This change ensures that we initialize Decldepth in all cases. Fixes #17588. Change-Id: I2e3c81ad52e8383395025388989e8dbf03438b68 Reviewed-on: https://go-review.googlesource.com/32415Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
We used to have to keep on-stack copies of these types. Now they can be registerized. [0]T is kind of trivial but might as well handle it. This change enables another change I'm working on to improve how x.(T) expressions are handled (#17405). This CL helps because now all types that are direct interface types are registerizeable (e.g. [1]*byte). No higher-degree arrays for now because non-constant indexes are hard. Update #17405 Change-Id: I2399940965d17b3969ae66f6fe447a8cefdd6edd Reviewed-on: https://go-review.googlesource.com/32416 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
David Chase authored
This is an extension of https://go-review.googlesource.com/c/31662/ to mark all the temporaries, not just the ssa-generated ones. Before-and-after ls -l `go tool -n compile` shows a 3% reduction in size (or rather, a prior 3% inflation for failing to filter temps out properly.) Replaced name-dependent "is it a temp?" tests with calls to *Node.IsAutoTmp(), which depends on AutoTemp. Also replace calls to istemp(n) with n.IsAutoTmp(), to reduce duplication and clean up function name space. Generated temporaries now come with a "." prefix to avoid (apparently harmless) clashes with legal Go variable names. Fixes #17644. Fixes #17240. Change-Id: If1417f29c79a7275d7303ddf859b51472890fd43 Reviewed-on: https://go-review.googlesource.com/32255 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Robert Griesemer authored
Change-Id: I8a28a88a655d9929f8641f71573dc01dc53be00f Reviewed-on: https://go-review.googlesource.com/32443Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Josh Bleecher Snyder authored
This picks up just a trivial fix, making vet (and thus me) happy. Change-Id: Ib82ae44c081ff1ec5c078196a6cd5e1a3505d03b Reviewed-on: https://go-review.googlesource.com/32427 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Change-Id: Ic66eb2939d83559610e62cbb181a8faa6193ecc4 Reviewed-on: https://go-review.googlesource.com/32426 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
Makes vet happy. Change-Id: I00de44a844afa57901b31991acf9e7ac834a9572 Reviewed-on: https://go-review.googlesource.com/32425 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
Fixes #17592. Change-Id: I914fa8c0729012990878b6e5c3e99b0f9b0e2be8 Reviewed-on: https://go-review.googlesource.com/32350 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Matthew Dempsky authored
-M, -P, and -R were for debugging backend passes that no longer exists. -g is used for debugging instructions generated with Gins, but the SSA backend mostly generates instructions directly. The handful of instructions still generated with Gins are pretty useless for debugging. -x was used to debug the old lexer, but now it only causes us to print file names as they're parsed, and only if we manually hack the compiler to enable tracing. Change-Id: Ia58d4bc9c1312693466171a3fcefc1221e9a2381 Reviewed-on: https://go-review.googlesource.com/32428 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Mike Strosaker authored
Adds an assembly implementation of sha256.block for ppc64le to improve its performance. This implementation is largely based on the original amd64 implementation, which unrolls the 64 iterations of the inner loop. Fixes #17652 benchmark old ns/op new ns/op delta BenchmarkHash8Bytes 1263 767 -39.27% BenchmarkHash1K 14048 7766 -44.72% BenchmarkHash8K 102245 55626 -45.60% benchmark old MB/s new MB/s speedup BenchmarkHash8Bytes 6.33 10.43 1.65x BenchmarkHash1K 72.89 131.85 1.81x BenchmarkHash8K 80.12 147.27 1.84x Change-Id: Ib4adf429423b20495580400be10bd7e171bcc70b Reviewed-on: https://go-review.googlesource.com/32318Reviewed-by:
Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by:
David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mike Strosaker authored
Adds an assembly implementation of sha512.block for ppc64le to improve its performance. This implementation is largely based on the original amd64 implementation, unrolling the 80 iterations of the inner loop. Fixes #17660 benchmark old ns/op new ns/op delta BenchmarkHash8Bytes 1715 1133 -33.94% BenchmarkHash1K 10098 5513 -45.41% BenchmarkHash8K 68004 35278 -48.12% benchmark old MB/s new MB/s speedup BenchmarkHash8Bytes 4.66 7.06 1.52x BenchmarkHash1K 101.40 185.72 1.83x BenchmarkHash8K 120.46 232.21 1.93x Change-Id: Ifd55a49a24cb159b3a09a8e928c3f37727aca103 Reviewed-on: https://go-review.googlesource.com/32320Reviewed-by:
Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by:
David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Matloob authored
These were accidentally removed by a rollback cl: golang.org/cl/32441 Change-Id: I0cfa8b3397be324dabfb8f33b6548a03c10571eb Reviewed-on: https://go-review.googlesource.com/32334Reviewed-by:
Alan Donovan <adonovan@google.com>
-
Michael Matloob authored
This reverts commit b33030a7. Reason for revert: We're going to try to get the code in this change submitted in smaller, more carefully reviewed changes. Change-Id: I4175f4b297f0e69fb78b11f9dc0bd82f27865be7 Reviewed-on: https://go-review.googlesource.com/32441Reviewed-by:
Russ Cox <rsc@golang.org>
-
Quentin Renard authored
Fixes #16997 Change-Id: I9ca27d8cff1905584862997d0e8a11ce3c4c21cb Reviewed-on: https://go-review.googlesource.com/30750Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Kevin Burke authored
Also add a link to more information about isolation levels as defined by the SQL standard. Fixes #17682. Change-Id: I94c53b713f4c882af40cf15fe5f1e5dbc53ea741 Reviewed-on: https://go-review.googlesource.com/32418Reviewed-by:
Daniel Theophanes <kardianos@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
INADA Naoki authored
Change-Id: If6eb3a7c9ad48a517e584567b1003479c1df6cca Reviewed-on: https://go-review.googlesource.com/32136Reviewed-by:
Daniel Theophanes <kardianos@gmail.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Jaana Burcu Dogan authored
Fixes #17686. Change-Id: I7d07c367e50b448579f9855bea43df76ddb82bd0 Reviewed-on: https://go-review.googlesource.com/32420Reviewed-by:
Rob Pike <r@golang.org>
-
Robert Griesemer authored
Does not handle imports of packages with exported aliases yet. For #17592. Change-Id: Iee63fb9d521014995003a417271fbe0384ae04ef Reviewed-on: https://go-review.googlesource.com/32108Reviewed-by:
Alan Donovan <adonovan@google.com>
-
David Crawshaw authored
The map[typeOff]*_type object is created at run time and stored in the moduledata. The moduledata object is marked by the linker as SNOPTRDATA, so the reference is ignored by the GC. Running misc/cgo/testplugin/test.bash with GOGC=1 will eventually collect the typemap and crash. This bug probably comes up in -linkshared binaries in Go 1.7. I don't know why we haven't seen a report about this yet. Fixes #17680 Change-Id: I0e9b5c006010e8edd51d9471651620ba665248d3 Reviewed-on: https://go-review.googlesource.com/32430 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Michael Hudson-Doyle <michael.hudson@canonical.com> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
David Crawshaw authored
Plumb the import path of a plugin package through to the linker, and use it as the prefix on the exported symbol names. Before this we used the basename of the plugin file as the prefix, which could conflict and result in multiple loaded plugins sharing symbols that are distinct. Fixes #17155 Fixes #17579 Change-Id: I7ce966ca82d04e8507c0bcb8ea4ad946809b1ef5 Reviewed-on: https://go-review.googlesource.com/32355Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 30 Oct, 2016 10 commits
-
-
Nigel Tao authored
Previously, we were off by one. Also fix a comment typo. Change-Id: Ib94d23acc56d5fccd44144f71655481f98803ac8 Reviewed-on: https://go-review.googlesource.com/32149Reviewed-by:
Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
This is convenient for direct use of `go tool cgo`. We can also use it from the go tool to reduce the length of the file names that cgo generates. Update #17070. Change-Id: I8466a0a2cc68a732d17d07319e303497715bac8c Reviewed-on: https://go-review.googlesource.com/32354 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Russ Cox authored
Disabled by https://golang.org/cl/53020044 due to false positives. Reenable and model properly. Fixes #17306. Change-Id: I28405ddfcd17f58cf1427c300273212729154359 Reviewed-on: https://go-review.googlesource.com/31589 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Dmitry Vyukov <dvyukov@google.com>
-
Ian Gudger authored
This field is a zero length array and has little use. Since Go 1.5, trailing zero-length arrays take up space. Both syscall.UnixRights() and syscall.ParseSocketControlMessage() depend on being able to do an unsafe cast of socket control message data to Cmsghdr this is only safe if the socket control message data is greater than or equal to the size of Cmsghdr. Since control message data that is equal in size to Cmsghdr without X__cmsg_data is a valid socket control message, we must remove X__cmsg_data or not perform the unsafe cast. Removing X__cmsg_data will prevent Go code that uses X__cmsg_data from compiling, but removing the unsafe cast will cause Go code that uses X__cmsg_data to fail or exhibit undefined behavior at runtime. It was therefore decided that removing X__cmsg_data was the better option. Fixes #17649 Change-Id: I39f323f978eca09d62da5785c5c5c9c7cbdf8c31 Reviewed-on: https://go-review.googlesource.com/32319Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Theophanes authored
Prior to this change, it was implied that transaction properties would be carried in the context value. However, no such properties were defined, not even common ones. Define two common properties: isolation level and read-only. Drivers may choose to support additional transaction properties. It is not expected any further transaction properties will be added in the future. Change-Id: I2f680115a14a1333c65ba6f943d9a1149d412918 Reviewed-on: https://go-review.googlesource.com/31258 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitry Vyukov authored
This updates the runtime to HEAD to keep it aligned and fixes some bugs. http://llvm.org/viewvc/llvm-project?view=revision&revision=285454 fixes the crash on darwin related to unaligned data section (#17065). http://llvm.org/viewvc/llvm-project?view=revision&revision=285451 enables core dumps by default (#16527). http://llvm.org/viewvc/llvm-project?view=revision&revision=285455 adds a hook to obtain number of races reported so far (#15972). Can now be obtained with: //go:nosplit func RaceReportCount() int { var n uint64 racecall(&__tsan_report_count, uintptr(unsafe.Pointer(&n)), 0, 0, 0) return int(n) } Fixes #16527. Fixes #17065. Update #15972. Change-Id: I8f869cb6275c9521a47303f3810a9965e9314357 Reviewed-on: https://go-review.googlesource.com/32160 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Keith Randall authored
No point in computing this info on startup. Compute it at build time. This lets us spend more time computing & checking the size classes. Improve the div magic for rounding to the start of an object. We can now use 32-bit multiplies & shifts, which should help 32-bit platforms. The static data is <1KB. The actual size classes are not changed by this CL. Change-Id: I6450cec7d1b2b4ad31fd3f945f504ed2ec6570e7 Reviewed-on: https://go-review.googlesource.com/32219 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
This fixes systems for which ccache is the default compiler. Also remove a couple of temporary files created by TestImportMain. Fixes #17668. Change-Id: I1edefdcec5f417be0533c146253c35ff4928c1c0 Reviewed-on: https://go-review.googlesource.com/32328Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Emmanuel Odeke authored
Provides redirection support for 307, 308 server statuses. Provides redirection support for DELETE method. Updates old tests that assumed all redirects were treated the way 301, 302 and 303 are processed. Fixes #9348 Fixes #10767 Fixes #13994 Change-Id: Iffa8dbe0ff28a1afa8da59869290ec805b1dd2c4 Reviewed-on: https://go-review.googlesource.com/29852 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: Iec469846dc8b5a747ad81690000f1f6f53721ea1 Reviewed-on: https://go-review.googlesource.com/32372Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 29 Oct, 2016 4 commits
-
-
Joe Tsai authored
The GZIP format records the ModTime as an uint32 counting seconds since the Unix epoch. The zero value is explicitly defined in section 2.3.1 as meaning no timestamp is available. Currently, the Writer always encodes the ModTime even if it is the zero time.Time value, which causes the Writer to try and encode the value -62135596800 into the uint32 MTIME field. This causes an overflow and results in our GZIP files having MTIME fields indicating a date in 2042-07-13. We alter the Writer to only encode ModTime if the value does not underflow the MTIME field (i.e., it is newer than the Unix epoch). We do not attempt to fix what happens when the timestamp overflows in the year 2106. We alter the Reader to only decode ModTime if the value is non-zero. There is no risk of overflowing time.Time when decoding. Fixes #17663 Change-Id: Ie1b65770c6342cd7b14aeebe10e5a49e6c9eb730 Reviewed-on: https://go-review.googlesource.com/32325Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Updates http2 to x/net git rev 76c1a11e for: http2: initialize Server.IdleTimeout from http.Server as http1 does https://golang.org/cl/32230 http2: change how Server.IdleTimeout is initialized from http.Server https://golang.org/cl/32323 Fixes #14204 Change-Id: I099f89fcd0d8bc0e42da163ae0a3b786fd81292f Reviewed-on: https://go-review.googlesource.com/32322 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
Because git. Change-Id: Ia1e7c6ba0e8c4d47f993487d2483cbb213b465e5 Reviewed-on: https://go-review.googlesource.com/32351 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
After the final slash, dots are %-escaped when constructing a symbol name, so that in the actual symbol table, the import path githost.com/my.git becomes githost.com/my%2egit. In this case, -X githost.com/my.git.Value=foo needs to set githost.com/my%2egit.Value. This is a detail of the object format and not something users should know or depend on, so apply the escaping as needed. People who have run across this already and figured out and started using the escaped forms with -X will find those forms not working anymore. That is, -X githost.com/my%2egit.Value=foo is the Go 1.7 workaround but will stop working in Go 1.8 once this proper fix is in place. People who need to keep scripts working with older and newer versions of Go can safely pass both forms, and one will be ignored: -X githost.com/my%2egit.Value=foo -X githost.com/my.git.Value=foo Fixes #16710. Change-Id: I0e994ccdd412a4eb8349fefce9aeb3bfc9a83cd8 Reviewed-on: https://go-review.googlesource.com/31970 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-