- 21 Dec, 2018 4 commits
-
-
Ian Lance Taylor authored
Fixes #27808 Change-Id: Ia643d51004c47953642a2ba41dfed281f1112be6 Reviewed-on: https://go-review.googlesource.com/c/155637Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Jay Conrod authored
When "go list" is invoked with -find, it clears the list of imports for each package matched on the command line. This affects action IDs, since they incorporate dependencies' action IDs. Consequently, the build triggered by -compiled won't find sources cached by "go build". We can still safely cache compiled sources from multiple runs of "go list -find -compiled" though, since cgo generated sources are not affected by imported dependencies. This change adds a second look into the cache in this situation. Fixes #29371 Change-Id: Ia0ae5a403ab5d621feaa16f521e6a65ac0ae6d9a Reviewed-on: https://go-review.googlesource.com/c/155481Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Jay Conrod authored
When building runtime/internal/atomic, the toolchain writes a symabis2 file. This file is read back in, filtered, and appended to the symabis file. This breaks with -n, since the symabis2 file is never written. With this change, when -n is used, an equivalent "grep" command is printed instead. The output for -x is unchanged. Fixes #29346 Change-Id: Id25e06e06364fc6689e71660d000f09c649c4f0c Reviewed-on: https://go-review.googlesource.com/c/155480Reviewed-by: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com>
-
Michael Anthony Knyszek authored
This change splits a testprog out of TestLockOSThreadExit and makes it its own test. Then, this change makes the testprog exit prematurely with a special message if unshare fails with EPERM because not all of the builders allow the user to call the unshare syscall. Also, do some minor cleanup on the TestLockOSThread* tests. Fixes #29366. Change-Id: Id8a9f6c4b16e26af92ed2916b90b0249ba226dbe Reviewed-on: https://go-review.googlesource.com/c/155437 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 20 Dec, 2018 13 commits
-
-
Ian Lance Taylor authored
Updates #26650 Change-Id: I0ec070127dcacc7fc68dd5baf125eb762e1ea846 Reviewed-on: https://go-review.googlesource.com/c/155038Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Matthew Dempsky authored
It was possible that var X interface{} = 'x' could cause a compilation failure due to having not calculated rune's width yet. typecheck.go normally calculates the width of things, but it doesn't for implicit conversions to default type. We already compute the width of all of the standard numeric types in universe.go, but we failed to calculate it for the rune alias type. So we could later crash if the code never otherwise explicitly mentioned 'rune'. While here, explicitly compute widths for 'byte' and 'error' for consistency. Fixes #29350. Change-Id: Ifedd4899527c983ee5258dcf75aaf635b6f812f8 Reviewed-on: https://go-review.googlesource.com/c/155380Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Kevin Burke authored
I was confused by the juxtaposition of os.Interrupt docs, which are "guaranteed to exist on all platforms" in one sentence and then "not implemented" in the next sentence. Reading the code reveals "not implemented" refers specifically to the implementation of os.Process.Signal on Windows, not to the os.Interrupt variable itself. Reword the doc to make this distinction clearer. Fixes #27854. Change-Id: I5fe7cddea61fa1954cef2006dc51b8fa8ece4d6e Reviewed-on: https://go-review.googlesource.com/c/137336Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Brian Kessler authored
Extended precision math/bits functions are unsigned. Change-Id: Ic1633e9c367fc3d5a80bc503008f035db4e78945 Reviewed-on: https://go-review.googlesource.com/c/155379Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Osamu TONOMORI authored
Change-Id: I84b74bc96516033bbf4a01f9aa81fe60d5a41355 Reviewed-on: https://go-review.googlesource.com/c/155317Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Fixes #28699 Change-Id: Ic340c3171bb7d91d8cb9553967c2b51e7d9daba8 Reviewed-on: https://go-review.googlesource.com/c/155177Reviewed-by: Bryan C. Mills <bcmills@google.com>
-
Keith Randall authored
Out-of-bounds reads of globals can happen in dead code. For code like this: s := "a" if len(s) == 3 { load s[0], s[1], and s[2] } The out-of-bounds loads are dead code, but aren't removed yet when lowering. We need to not panic when compile-time evaluating those loads. This can only happen for dead code, so the result doesn't matter. Fixes #29215 Change-Id: I7fb765766328b9524c6f2a1e6ab8d8edd9875097 Reviewed-on: https://go-review.googlesource.com/c/154057 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
-
Tobias Klauser authored
Currently the link works also with the non-existing GOARCH armd64, but let's correct in anyhow. Change-Id: Ida647b8f9dd2f8460b019f5a23759f10a6da8e60 Reviewed-on: https://go-review.googlesource.com/c/155277Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Tobias Klauser authored
Update to x/sys git revision 074acd46bca67915925527c07849494d115e7c43 This fixes TestFormatMessage and TestExample on windows/arm by pulling in CL 154560 and CL 154817. Change-Id: Ic6495fe3072b5bcc7ea68efb3f0be5fc1fe4c238 Reviewed-on: https://go-review.googlesource.com/c/155297 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Before this CL we accepted timeouts in TestUDPZeroBytePayload to avoid flakiness and because, according to CL 9194, the test didn't work on some platforms. On Windows, before CL 132781, the read would always timeout, and so since the test accepted timeouts it would pass incorrectly. CL 132781 fixed Windows, and changed the test to not accept timeouts in the ReadFrom case. However, the timeout was short, and so on a loaded system the Read might timeout not due to an error in the code, but just because the read was not delivered. So ignoring timeouts made the test flaky, as reported in issue #29225. This CL tries to get to a better state by increasing the timeout to a large value and not permitting timeouts at all. If there are systems where the test fails, we will need to explicitly skip the test on those systems. Fixes #29225 Change-Id: I26863369898a69cac866b34fcb5b6ffbffab31f6 Reviewed-on: https://go-review.googlesource.com/c/154759 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alex Brainman authored
If TMP environment variable is set to Z:\, TempDir returns Z:. But Z: refers to current directory on Z:, while Z:\ refers to root directory on Z:. Adjust TempDir to return Z:\. Fixes #29291 Change-Id: If04d0c7977a8ac2d9d558307502e81beb68776ef Reviewed-on: https://go-review.googlesource.com/c/154384 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
catatsuy authored
Change-Id: Iaa1468296fbc98389165a152cf8b591216c22489 Reviewed-on: https://go-review.googlesource.com/c/155217Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Jordan Rhee authored
Tracing uses cputicks() to generate trace event timestamps. cputicks() is expected to be a high resolution clock source. On Windows/ARM, call QueryPerformanceCounter() which is the highest resolution clock source available. Updates #26148 Change-Id: I987fa556060b3d60c02f07b87b9e6320b9b026e2 Reviewed-on: https://go-review.googlesource.com/c/154762Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 19 Dec, 2018 8 commits
-
-
Michael Anthony Knyszek authored
When a locked M has its G exit without calling UnlockOSThread, then lockedExt on it was getting cleared. Unfortunately, this meant that during P handoff, if a new M was started, it might get forked (on most OSs besides Windows) from the locked M, which could have kernel state attached to it. To solve this, just don't clear lockedExt. At the point where the locked M has its G exit, it will also exit in accordance with the LockOSThread API. So, we can safely assume that it's lockedExt state will no longer be used. For the case of the main thread where it just gets wedged instead of exiting, it's probably better for it to keep the locked marker since it more accurately represents its state. Fixed #28979. Change-Id: I7d3d71dd65bcb873e9758086d2cbcb9a06429b0f Reviewed-on: https://go-review.googlesource.com/c/153078 Run-TryBot: Michael Knyszek <mknyszek@google.com> Reviewed-by: Austin Clements <austin@google.com>
-
Michael Anthony Knyszek authored
This change disables the test TestArenaCollision on Darwin in race mode to deal with the fact that Darwin 10.10 must use MAP_FIXED in race mode to ensure we retain our heap in a particular portion of the address space which the race detector needs. The test specifically checks to make sure a manually mapped region's space isn't re-used, which is definitely possible with MAP_FIXED because it replaces whatever mapping already exists at a given address. This change then also makes it so that MAP_FIXED is only used in race mode and on Darwin, not all BSDs, because using MAP_FIXED breaks this test for FreeBSD in addition to Darwin. Updates #26475. Fixes #29340. Change-Id: I1c59349408ccd7eeb30c4bf2593f48316b23ab2f Reviewed-on: https://go-review.googlesource.com/c/155097 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Jordan Rhee authored
This reverts change https://golang.org/cl/154758. Restore the previous implementations of nanotime and time.now, which are sufficiently high resolution and more efficient than QueryPerformanceCounter. The intent of the change was to improve resolution of tracing timestamps, but the change was overly broad as it was only necessary to fix cputicks(). cputicks() is fixed in a subsequent change. Updates #26148 Change-Id: Ib9883d02fe1af2cc4940e866d8f6dc7622d47781 Reviewed-on: https://go-review.googlesource.com/c/154761Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Agniva De Sarker authored
Change-Id: I767bf77aeab62f2d42239fac9d601a8e04fe860f Reviewed-on: https://go-review.googlesource.com/c/154957Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Tobias Klauser authored
Fix two typos and don't indent the go vet example. Change-Id: Iccec56ca5decfbae45547a00115500ed13b703e1 Reviewed-on: https://go-review.googlesource.com/c/154721Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
This was accidentally broken by CL 127755. Fixes #29333 Change-Id: I5e92048c64a55c1699d6c38eb4dbbd51c817b820 Reviewed-on: https://go-review.googlesource.com/c/155037 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Elias Naur authored
Change-Id: I3c8ba5fdb05b6b1324648622656cc10071c70a34 Reviewed-on: https://go-review.googlesource.com/c/154997Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Michael Anthony Knyszek authored
startpanic_m could be called correctly in a context where there's a valid G, a valid M, but no P, for example in a signal handler which panics. Currently, startpanic_m has write barriers enabled because write barriers are permitted if a G's M is dying. However, all the current write barrier implementations assume the current G has a P. Therefore, in this change we disable write barriers in startpanic_m, remove the only pointer write which clears g.writebuf, and fix up gwrite to ignore the writebuf if the current G's M is dying, rather than relying on it being nil in the dying case. Fixes #26575. Change-Id: I9b29e6b9edf00d8e99ffc71770c287142ebae086 Reviewed-on: https://go-review.googlesource.com/c/154837 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
- 18 Dec, 2018 15 commits
-
-
Jordan Rhee authored
The previous implementation of nanotime and time.now used a time source that was updated on the system clock tick, which has a maximum resolution of about 1ms. On 386 and amd64, this time source maps to the system performance counter, so has much higher resolution. On ARM, use QueryPerformanceCounter() to get a high resolution timestamp. Updates #26148 Change-Id: I1abc99baf927a95b472ac05020a7788626c71d08 Reviewed-on: https://go-review.googlesource.com/c/154758Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Elias Naur authored
Change-Id: I4277f4130b460b42c5b51fd5a5e07f6c0e62163b Reviewed-on: https://go-review.googlesource.com/c/154720Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Filippo Valsorda authored
Change-Id: I9a30c76d1299a494cce69b1060156bc2932ac8d5 Reviewed-on: https://go-review.googlesource.com/c/154857Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Kevin Burke authored
Permission bits are most commonly viewed in string form (rwx-- etc) or in octal form (0755), but the latter is relatively rare in Go. Demonstrate how to print a FileMode in readable octal format. Change-Id: I41feb801bcecb5077d4eabafdea27c149fc179a1 Reviewed-on: https://go-review.googlesource.com/c/154423 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Michael Anthony Knyszek authored
This change makes it so that reserving more of the address space for the heap calls mmap with MAP_FIXED in race mode. Race mode requires certain guarantees on where the heap is located in the address space, and on Darwin 10.10 it appears that the kernel may end up ignoring the hint quite often (#26475). Using MAP_FIXED is relatively OK in race mode because nothing else should be mapped in the memory region provided by the initial hints. Fixes #26475. Change-Id: Id7ac1534ee74f6de491bc04441f27dbda09f0285 Reviewed-on: https://go-review.googlesource.com/c/153897Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
When using //line directives and unformatted code it is possible for positions to repeat. Increment the final column position to avoid that. Fixes #27350 Change-Id: I2faccc31360075e9814d4a024b0f98b117f8ce97 Reviewed-on: https://go-review.googlesource.com/c/153061 Run-TryBot: Rob Pike <r@golang.org> Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
This ensures that "go test cmd/cover" tests the current cover program, not the installed cover program. Change-Id: I58e718ded7eb1cd8da448d0194262209bb025b20 Reviewed-on: https://go-review.googlesource.com/c/153058 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Cherry Zhang authored
CL 138675 added the race detector support on Linux/ARM64, but it didn't enable the race detector tests in cmd/dist (therefore in all.bash). Enable them. Updates #28848 Change-Id: I4306dad2fb4167021d568436076b9f535d7f6e07 Reviewed-on: https://go-review.googlesource.com/c/149967 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Filippo Valsorda authored
Change-Id: I598c9a2031001a6780b75c31d9015c880741b170 Reviewed-on: https://go-review.googlesource.com/c/154637Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Dmitri Shuralyov authored
Also update a Go 1 compatibility promise link to canonical URL. Updates #27592 Updates #28264 Change-Id: I5994a0a63e0870c1795c65016590dfad829d26a7 Reviewed-on: https://go-review.googlesource.com/c/154618Reviewed-by: Richard Musiol <neelance@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Martin Möhrmann authored
Change-Id: Id68b62138e14d13bb352b14c7f42bcef5601eee3 Reviewed-on: https://go-review.googlesource.com/c/154717Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Clément Chigot authored
This commit fixes backtrace if a crash or an exit signal is received during a C syscall on aix/ppc64. This is similar to Solaris, Darwin or Windows implementation. Change-Id: I6040c0b1577a9f5b298f58bd4ee6556258a135ef Reviewed-on: https://go-review.googlesource.com/c/154718 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
This commit changes the second instruction used to retrieve a symbol on aix/ppc64 if it is in .data or .bss section. The previous version always retrieves the symbol address via a load on its TOC symbol. However, as the TOC is also in .data, the symbol's address is close enough to be fetched directly and the load instruction can be replaced by an addi. Bench go1 benchmark old ns/op new ns/op delta BenchmarkBinaryTree17-16 5919354000 5824897000 -1.60% BenchmarkFannkuch11-16 5206937000 5162043000 -0.86% BenchmarkFmtFprintfEmpty-16 106 105 -0.94% BenchmarkFmtFprintfString-16 165 165 +0.00% BenchmarkFmtFprintfInt-16 165 167 +1.21% BenchmarkFmtFprintfIntInt-16 303 239 -21.12% BenchmarkFmtFprintfPrefixedInt-16 282 283 +0.35% BenchmarkFmtFprintfFloat-16 434 381 -12.21% BenchmarkFmtManyArgs-16 1797 903 -49.75% BenchmarkGobDecode-16 16000450 12173630 -23.92% BenchmarkGobEncode-16 12007010 10258070 -14.57% BenchmarkGzip-16 638581500 456050333 -28.58% BenchmarkGunzip-16 111976900 74943900 -33.07% BenchmarkHTTPClientServer-16 206850 153716 -25.69% BenchmarkJSONEncode-16 32057380 17517130 -45.36% BenchmarkJSONDecode-16 182606400 106807700 -41.51% BenchmarkMandelbrot200-16 6896975 5616903 -18.56% BenchmarkGoParse-16 11248260 6094115 -45.82% BenchmarkRegexpMatchEasy0_32-16 292 148 -49.32% BenchmarkRegexpMatchEasy0_1K-16 540 327 -39.44% BenchmarkRegexpMatchEasy1_32-16 243 150 -38.27% BenchmarkRegexpMatchEasy1_1K-16 1029 657 -36.15% BenchmarkRegexpMatchMedium_32-16 423 230 -45.63% BenchmarkRegexpMatchMedium_1K-16 107250 59683 -44.35% BenchmarkRegexpMatchHard_32-16 3353 3139 -6.38% BenchmarkRegexpMatchHard_1K-16 107277 93610 -12.74% BenchmarkRevcomp-16 1124311500 677442500 -39.75% BenchmarkTemplate-16 241286600 109177400 -54.75% BenchmarkTimeParse-16 1058 562 -46.88% BenchmarkTimeFormat-16 1321 581 -56.02% benchmark old MB/s new MB/s speedup BenchmarkGobDecode-16 47.97 63.05 1.31x BenchmarkGobEncode-16 63.92 74.82 1.17x BenchmarkGzip-16 30.39 42.55 1.40x BenchmarkGunzip-16 173.29 258.92 1.49x BenchmarkJSONEncode-16 60.53 110.78 1.83x BenchmarkJSONDecode-16 10.63 18.17 1.71x BenchmarkGoParse-16 5.15 9.50 1.84x BenchmarkRegexpMatchEasy0_32-16 109.42 215.86 1.97x BenchmarkRegexpMatchEasy0_1K-16 1896.22 3126.28 1.65x BenchmarkRegexpMatchEasy1_32-16 131.46 212.99 1.62x BenchmarkRegexpMatchEasy1_1K-16 994.55 1557.51 1.57x BenchmarkRegexpMatchMedium_32-16 2.36 4.34 1.84x BenchmarkRegexpMatchMedium_1K-16 9.55 17.16 1.80x BenchmarkRegexpMatchHard_32-16 9.54 10.19 1.07x BenchmarkRegexpMatchHard_1K-16 9.55 10.94 1.15x BenchmarkRevcomp-16 226.06 375.19 1.66x BenchmarkTemplate-16 8.04 17.77 2.21x Change-Id: Iaf2aa5953b99271361510c69a5ced3371f6c6c20 Reviewed-on: https://go-review.googlesource.com/c/151201 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Clément Chigot authored
Fixes #29315 Change-Id: I6ecc5109c23e7a7d9db54250bf041acc841701e3 Reviewed-on: https://go-review.googlesource.com/c/154697Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Austin Clements authored
Currently, we flush the write barrier buffer on every write barrier once throwOnGCWork is set, but not during the mark completion algorithm itself. As seen in recent failures like https://build.golang.org/log/317369853b803b4ee762b27653f367e1aa445ac1 by the time we actually catch a late gcWork put, the write barrier buffer is full-size again. As a result, we're probably not catching the actual problematic write barrier, which is probably somewhere in the buffer. Fix this by using the gcWork pause generation to also keep the write barrier buffer small between the mark completion flushes it and when mark completion is done. For #27993. Change-Id: I77618169441d42a7d562fb2a998cfaa89891edb2 Reviewed-on: https://go-review.googlesource.com/c/154638 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
-