- 11 May, 2015 6 commits
-
-
Russ Cox authored
The type information in reflect.Type and the GC programs is now 1 bit per word, down from 2 bits. The in-memory unrolled type bitmap representation are now 1 bit per word, down from 4 bits. The conversion from the unrolled (now 1-bit) bitmap to the heap bitmap (still 4-bit) is not optimized. A followup CL will work on that, after the heap bitmap has been converted to 2-bit. The typeDead optimization, in which a special value denotes that there are no more pointers anywhere in the object, is lost in this CL. A followup CL will bring it back in the final form of heapBitsSetType. Change-Id: If61e67950c16a293b0b516a6fd9a1c755b6d5549 Reviewed-on: https://go-review.googlesource.com/9702Reviewed-by: Austin Clements <austin@google.com>
-
Russ Cox authored
There was an old benchmark that measured this indirectly via allocation, but I don't understand how to factor out the allocation cost when interpreting the numbers. Replace with a benchmark that only calls heapBitsSetType, that does not allocate. This was not possible when the benchmark was first written, because heapBitsSetType had not been factored out of mallocgc. Change-Id: I30f0f02362efab3465a50769398be859832e6640 Reviewed-on: https://go-review.googlesource.com/9701Reviewed-by: Austin Clements <austin@google.com>
-
Daniel Morsing authored
Since we now have stack information for code running on the systemstack, we can traceback over it. To make cpu profiles useful, add a case in gentraceback to jump over systemstack switches. Fixes #10609. Change-Id: I21f47fcc802c07c5d4a1ada56374314e388a6dc7 Reviewed-on: https://go-review.googlesource.com/9506Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
-
Patrick Mezard authored
I have around twenty of such values on a Windows 7 development machine. regedit displays (translated): "invalid 32-bits DWORD value". Change-Id: Ib37a414ee4c85e891b0a25fed2ddad9e105f5f4e Reviewed-on: https://go-review.googlesource.com/9901Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Shenghou Ma authored
The trace-viewer doesn't use the Go license, so it makes sense to include the license text into the README.md file. While we're at here, reformat existing text using real Markdown syntax. Change-Id: I13e42d3cc6a0ca7e64e3d46ad460dc0460f7ed09 Reviewed-on: https://go-review.googlesource.com/9882Reviewed-by: Rob Pike <r@golang.org>
-
Mikio Hara authored
On darwin/arm, the test sometimes fails with: Process 557 resuming --- FAIL: TestWriteTimeoutFluctuation (1.64s) timeout_test.go:706: Write took over 1s; expected 0.1s FAIL Process 557 exited with status = 1 (0x00000001) go_darwin_arm_exec: timeout running tests This change increaes timeout on iOS builders from 1s to 3s as a temporarily fix. Updates #10775. Change-Id: Ifdaf99cf5b8582c1a636a0f7d5cc66bb276efd72 Reviewed-on: https://go-review.googlesource.com/9915Reviewed-by: Minux Ma <minux@golang.org>
-
- 10 May, 2015 2 commits
-
-
Shenghou Ma authored
Thanks Dmitri Shuralyov for pointing it out. Change-Id: If9c5ac0e56d601d327b2b682ee3548037439cb83 Reviewed-on: https://go-review.googlesource.com/9881Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Patrick Mezard authored
ExpandString correctly loops on the syscall until it reaches the required buffer size but truncates it before converting it back to string. The truncation limit is increased to 2^15 bytes which is the documented maximum ExpandEnvironmentStrings output size. This fixes TestExpandString on systems where len($PATH) > 1024. Change-Id: I2a6f184eeca939121b458bcffe1a436a50f3298e Reviewed-on: https://go-review.googlesource.com/9805Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 09 May, 2015 3 commits
-
-
Shenghou Ma authored
There is no SYS_INOTIFY_INIT on linux/arm64, only SYS_INOTIFY_INIT1. Change-Id: I97f430f2c2b910fb19dce495ff1adf591b8634fc Reviewed-on: https://go-review.googlesource.com/9870 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
-
Rahul Chaudhry authored
Change-Id: I72df4d979212d8af74a4d2763423346eb6ba14f2 Reviewed-on: https://go-review.googlesource.com/9892Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Change-Id: I4ade27469d82839b4396e1a88465dddc6b31d578 Reviewed-on: https://go-review.googlesource.com/9838Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
-
- 08 May, 2015 6 commits
-
-
Didier Spezia authored
The html package uses some specific code to escape special characters. Actually, the strings.Replacer can be used instead, and is much more efficient. The converse operation is more complex but can still be slightly optimized. Credits to Ken Bloom (kabloom@google.com), who first submitted a similar patch at https://codereview.appspot.com/141930043 Added benchmarks and slightly optimized UnescapeString. benchmark old ns/op new ns/op delta BenchmarkEscape-4 118713 19825 -83.30% BenchmarkEscapeNone-4 87653 3784 -95.68% BenchmarkUnescape-4 24888 23417 -5.91% BenchmarkUnescapeNone-4 14423 157 -98.91% benchmark old allocs new allocs delta BenchmarkEscape-4 9 2 -77.78% BenchmarkEscapeNone-4 0 0 +0.00% BenchmarkUnescape-4 2 2 +0.00% BenchmarkUnescapeNone-4 0 0 +0.00% benchmark old bytes new bytes delta BenchmarkEscape-4 24800 12288 -50.45% BenchmarkEscapeNone-4 0 0 +0.00% BenchmarkUnescape-4 10240 10240 +0.00% BenchmarkUnescapeNone-4 0 0 +0.00% Fixes #8697 Change-Id: I208261ed7cbe9b3dee6317851f8c0cf15528bce4 Reviewed-on: https://go-review.googlesource.com/9808 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Rob Pike authored
Delete the colon from RUN: for examples, since it's not there for tests. Add spaces to line up RUN and PASS: lines. Before: === RUN TestCount --- PASS: TestCount (0.00s) === RUN: ExampleFields --- PASS: ExampleFields (0.00s) After: === RUN TestCount --- PASS: TestCount (0.00s) === RUN ExampleFields --- PASS: ExampleFields (0.00s) Fixes #10594. Change-Id: I189c80a5d99101ee72d8c9c3a4639c07e640cbd8 Reviewed-on: https://go-review.googlesource.com/9846Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Didier Spezia authored
Pipelines are altered by inserting sanitizers if they are not already present. The code makes the assumption that the first operands of each commands are function identifiers. This is wrong, since they can also be methods. It results in a panic with templates such as {{1|print 2|.f 3}} Adds an extra type assertion to make sure only identifiers are compared with sanitizers. Fixes #10673 Change-Id: I3eb820982675231dbfa970f197abc5ef335ce86b Reviewed-on: https://go-review.googlesource.com/9801Reviewed-by: Rob Pike <r@golang.org>
-
Brett Cannon authored
In the Slices section of Effective Go, the os package's File.Read function is used as an example. Unfortunately the function signature does not match the function's code in the example, nor the os package's documentation. This change updates the function signature to match the os package and the pre-existing function code. Change-Id: Iae9f30c898d3a1ff8d47558ca104dfb3ff07112c Reviewed-on: https://go-review.googlesource.com/9845Reviewed-by: Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
This will make it possible for C++ code to #include the export header file and see the correct declarations. The preamble remains the user's responsibility. It would not be appropriate to wrap the preamble in extern "C", because it might include header files that work with both C and C++. Putting those header files in an extern "C" block would break them. Change-Id: Ifb40879d709d26596d5c80b1307a49f1bd70932a Reviewed-on: https://go-review.googlesource.com/9850Reviewed-by: Minux Ma <minux@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shenghou Ma authored
With this patch, gdb seems to be able to corretly backtrace Go process on at least linux/{arm,arm64,ppc64}. Change-Id: Ic40a2a70e71a19c4a92e4655710f38a807b67e9a Reviewed-on: https://go-review.googlesource.com/9822 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 07 May, 2015 19 commits
-
-
Josh Bleecher Snyder authored
Fixes #8927. Change-Id: I638cddd439dd2d4eeef5474118cfcbde0c8a5a43 Reviewed-on: https://go-review.googlesource.com/9632 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: David Chase <drchase@google.com>
-
Russ Cox authored
Change-Id: Ic8cb8b1ed8715d6d5a53ec3cac385c0e93883514 Reviewed-on: https://go-review.googlesource.com/9825Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Russ Cox authored
It was testing the mark bits on what roots pointed at, but not the remainder of the live heap, because in CL 2991 I accidentally inverted this check during refactoring. The next CL will turn it back off by default again, but I want one run on the builders with the full checkmark checks. Change-Id: Ic166458cea25c0a56e5387fc527cb166ff2e5ada Reviewed-on: https://go-review.googlesource.com/9824 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Rick Hudson authored
Currently the heap minimum is set to 4MB which prevents our ability to collect at every allocation by setting GOGC=0. This adjust the heap minimum to 4MB*GOGC/100 thus reenabling collecting at every allocation. Fixes #10681 Change-Id: I912d027dac4b14ae535597e8beefa9ac3fb8ad94 Reviewed-on: https://go-review.googlesource.com/9814Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Rob Pike authored
This was added during testing but is unnecessary. Thanks to gravis on GitHub for catching it. See #10574. Change-Id: I4a8f76d237e67f5a0ea189a0f3cadddbf426778a Reviewed-on: https://go-review.googlesource.com/9841Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
The code already handled high widths but not high precisions. Also make sure it handles the harder cases of %U. Fixes #10745. Change-Id: Ib4d394d49a9941eeeaff866dc59d80483e312a98 Reviewed-on: https://go-review.googlesource.com/9769Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
When using -buildmode=c-archive or c-shared, and when installing packages that use cgo, and when those packages export some functions via //export comments, then for each such package, install a pkg.h header file that declares the functions. This permits C code to #include the header when calling the Go functions. This is a little awkward to use when there are multiple packages that export functions, as you have to "go install" your c-archive/c-shared object and then pull it out of the package directory. When compiling your C code you have to -I pkg/$GOOS_$GOARCH. I haven't thought of any more convenient approach. It's simpler when only the main package has exported functions. When using c-shared you currently have to use a _shared suffix in the -I option; it would be nice to fix that somehow. Change-Id: I5d8cf08914b7d3c2b194120c77791d2732ffd26e Reviewed-on: https://go-review.googlesource.com/9798Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Chase authored
Try to provide hints for common areas, either *interface were interface would have been better, and note incorrect capitalization (but don't be more ambitious than that, at least not today). Added code and test for cases ptrInterface.ExistingMethod ptrInterface.unexportedMethod ptrInterface.MissingMethod ptrInterface.withwRongcASEdMethod interface.withwRongcASEdMethod ptrStruct.withwRongcASEdMethod struct.withwRongcASEdMethod also included tests for related errors to check for unintentional changes and consistent wording. Somewhat simplified from previous versions to avoid second- guessing user errors, yet also biased to point out most-likely root cause. Fixes #10700 Change-Id: I16693e93cc8d8ca195e7742a222d640c262105b4 Reviewed-on: https://go-review.googlesource.com/9731Reviewed-by: Russ Cox <rsc@golang.org>
-
Michael Hudson-Doyle authored
Current code just checks the consistency (that the functab is correctly sorted by PC, etc) of the moduledata object that the runtime belongs to. Change to check all of them. Change-Id: I544a44c5de7445fff87d3cdb4840ff04c5e2bf75 Reviewed-on: https://go-review.googlesource.com/9773Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
John Dethridge authored
When AttrByteSize is not present for a type, we can still determine the size in two more cases: when the type is a Typedef referring to another type, and when the type is a pointer and we know the default address size. entry.go: return after setting an error if the offset is out of range. Change-Id: I63a922ca4e4ad2fc9e9be3e5b47f59fae7d0eb5c Reviewed-on: https://go-review.googlesource.com/9663Reviewed-by: Austin Clements <austin@google.com>
-
Alex Brainman authored
No code changes, but the test passes here. And TryBots are happy. Fixes #8662 maybe Change-Id: Id37380f72a951c9ad7cf96c0db153c05167e62ed Reviewed-on: https://go-review.googlesource.com/9778Reviewed-by: Minux Ma <minux@golang.org>
-
Ian Lance Taylor authored
The -exportheader option tells cgo to generate a header file declaring expoted functions. The header file is only created if there are, in fact, some exported functions, so it also serves as a signal as to whether there were any. In future CLs the go tool will use this option to install header files for packages that use cgo and export functions. Change-Id: I5b04357d453a9a8f0e70d37f8f18274cf40d74c9 Reviewed-on: https://go-review.googlesource.com/9796Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Shenghou Ma authored
Similar for linux/386 with GO386=387. Change-Id: If8b6f8a0659a1b3e078d87a43fcfe8a38af20308 Reviewed-on: https://go-review.googlesource.com/9821Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
To be fixed later. Updates #10730 Change-Id: Icac19f48c9e035dce192c97943b77b60411a3ea2 Reviewed-on: https://go-review.googlesource.com/9797Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
-
Mikio Hara authored
This change doesn't work perfectly on IPv6-only kernels including CLAT enabled kernels, but works enough on IPv4-only kernels. Fixes #10721. Updates #10729. Change-Id: I7db0e572e252aa0a9f9f54c8e557955077b72e44 Reviewed-on: https://go-review.googlesource.com/9777Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Mikio Hara authored
Also adds missing temporary file deletion. Change-Id: Ia644b0898022e05d2f5232af38f51d55e40c6fb5 Reviewed-on: https://go-review.googlesource.com/9772Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Mikio Hara authored
Change-Id: I70dfc2bad13c513c376c7c41058774b40af73dce Reviewed-on: https://go-review.googlesource.com/9775Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Ian Lance Taylor authored
Change-Id: If53563f3477222fe7409011b8780bb0926567251 Reviewed-on: https://go-review.googlesource.com/9767Reviewed-by: Minux Ma <minux@golang.org>
-
Alex Brainman authored
Makes searching in source code easier. Change-Id: Ie2e85934d23920ac0bc01d28168bcfbbdc465580 Reviewed-on: https://go-review.googlesource.com/9774Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com> Reviewed-by: Minux Ma <minux@golang.org>
-
- 06 May, 2015 4 commits
-
-
Shenghou Ma authored
Otherwise misc/cgo/test won't be tested on iOS. Change-Id: I7ee78c825b0bb092c7a8b2c2ece5a6eda2f6cf95 Reviewed-on: https://go-review.googlesource.com/9643Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
Also copy doc comments from Go code to _cgo_export.h. This is a step toward installing this generated file when using -buildmode=c-archive or c-shared, so that C code can #include it. Change-Id: I3a243f7b386b58ec5c5ddb9a246bb9f9eddc5fb8 Reviewed-on: https://go-review.googlesource.com/9790Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Rob Pike authored
Already done for constants and funcs, but I didn't realize that some global vars were also not in the global list. This fixes go doc build.Default Change-Id: I768bde13a400259df3e46dddc9f58c8f0e993c72 Reviewed-on: https://go-review.googlesource.com/9764Reviewed-by: Andrew Gerrand <adg@golang.org>
-
Rob Pike authored
Fixes #10713. Change-Id: Ifdafc340ae3bba751236f0482246c568346a569c Reviewed-on: https://go-review.googlesource.com/9763Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-