1. 02 Mar, 2016 16 commits
    • Russ Cox's avatar
      runtime/pprof: sort counted profiles by count · 6969d9bf
      Russ Cox authored
      This is especially helpful in programs with very large numbers of goroutines:
      the bulk of the goroutines will show up at the top.
      
      Before:
      	1 @ 0x86ab8 0x86893 0x82164 0x8e7ce 0x7b798 0x5b871
      	#	0x86ab8	runtime/pprof.writeRuntimeProfile+0xb8		/Users/rsc/go/src/runtime/pprof/pprof.go:545
      	#	0x86893	runtime/pprof.writeGoroutine+0x93		/Users/rsc/go/src/runtime/pprof/pprof.go:507
      	#	0x82164	runtime/pprof.(*Profile).WriteTo+0xd4		/Users/rsc/go/src/runtime/pprof/pprof.go:236
      	#	0x8e7ce	runtime/pprof_test.TestGoroutineCounts+0x15e	/Users/rsc/go/src/runtime/pprof/pprof_test.go:603
      	#	0x7b798	testing.tRunner+0x98				/Users/rsc/go/src/testing/testing.go:473
      
      	1 @ 0x2d373 0x2d434 0x560f 0x516b 0x7cd42 0x7b861 0x2297 0x2cf90 0x5b871
      	#	0x7cd42	testing.RunTests+0x8d2	/Users/rsc/go/src/testing/testing.go:583
      	#	0x7b861	testing.(*M).Run+0x81	/Users/rsc/go/src/testing/testing.go:515
      	#	0x2297	main.main+0x117		runtime/pprof/_test/_testmain.go:72
      	#	0x2cf90	runtime.main+0x2b0	/Users/rsc/go/src/runtime/proc.go:188
      
      	10 @ 0x2d373 0x2d434 0x560f 0x516b 0x8e5b6 0x5b871
      	#	0x8e5b6	runtime/pprof_test.func1+0x36	/Users/rsc/go/src/runtime/pprof/pprof_test.go:582
      
      	50 @ 0x2d373 0x2d434 0x560f 0x516b 0x8e656 0x5b871
      	#	0x8e656	runtime/pprof_test.func3+0x36	/Users/rsc/go/src/runtime/pprof/pprof_test.go:584
      
      	40 @ 0x2d373 0x2d434 0x560f 0x516b 0x8e606 0x5b871
      	#	0x8e606	runtime/pprof_test.func2+0x36	/Users/rsc/go/src/runtime/pprof/pprof_test.go:583
      
      After:
      
      	50 @ 0x2d373 0x2d434 0x560f 0x516b 0x8ecc6 0x5b871
      	#	0x8ecc6	runtime/pprof_test.func3+0x36	/Users/rsc/go/src/runtime/pprof/pprof_test.go:584
      
      	40 @ 0x2d373 0x2d434 0x560f 0x516b 0x8ec76 0x5b871
      	#	0x8ec76	runtime/pprof_test.func2+0x36	/Users/rsc/go/src/runtime/pprof/pprof_test.go:583
      
      	10 @ 0x2d373 0x2d434 0x560f 0x516b 0x8ec26 0x5b871
      	#	0x8ec26	runtime/pprof_test.func1+0x36	/Users/rsc/go/src/runtime/pprof/pprof_test.go:582
      
      	1 @ 0x2d373 0x2d434 0x560f 0x516b 0x7cd42 0x7b861 0x2297 0x2cf90 0x5b871
      	#	0x7cd42	testing.RunTests+0x8d2	/Users/rsc/go/src/testing/testing.go:583
      	#	0x7b861	testing.(*M).Run+0x81	/Users/rsc/go/src/testing/testing.go:515
      	#	0x2297	main.main+0x117		runtime/pprof/_test/_testmain.go:72
      	#	0x2cf90	runtime.main+0x2b0	/Users/rsc/go/src/runtime/proc.go:188
      
      	1 @ 0x87128 0x86f03 0x82164 0x8ee30 0x7b798 0x5b871
      	#	0x87128	runtime/pprof.writeRuntimeProfile+0xb8		/Users/rsc/go/src/runtime/pprof/pprof.go:566
      	#	0x86f03	runtime/pprof.writeGoroutine+0x93		/Users/rsc/go/src/runtime/pprof/pprof.go:528
      	#	0x82164	runtime/pprof.(*Profile).WriteTo+0xd4		/Users/rsc/go/src/runtime/pprof/pprof.go:236
      	#	0x8ee30	runtime/pprof_test.TestGoroutineCounts+0x150	/Users/rsc/go/src/runtime/pprof/pprof_test.go:603
      	#	0x7b798	testing.tRunner+0x98				/Users/rsc/go/src/testing/testing.go:473
      
      Change-Id: I43de9eee2d96f9c46f7b0fbe099a0571164324f5
      Reviewed-on: https://go-review.googlesource.com/20107Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      6969d9bf
    • Robert Griesemer's avatar
      cmd/compile: use int32 for line numbers consistently · b83f3972
      Robert Griesemer authored
      - removed lots of unnecessary int(x) casts
      - removed parserline() - was inconsistently used anyway
      - minor simplifications in dcl.go
      
      Change-Id: Ibf7de679eea528a31c9692ef1c76a1d9b3239211
      Reviewed-on: https://go-review.googlesource.com/20131Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      b83f3972
    • Ian Lance Taylor's avatar
      go/ast: fix typo in comment · 053aef4f
      Ian Lance Taylor authored
      Change-Id: I719231466286b3c0135314388a7c560ef44d7c35
      Reviewed-on: https://go-review.googlesource.com/20130
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      053aef4f
    • Tamir Duberstein's avatar
      crypto/tls: check errors from (*Conn).writeRecord · 37c28759
      Tamir Duberstein authored
      This promotes a connection hang during TLS handshake to a proper error.
      This doesn't fully address #14539 because the error reported in that
      case is a write-on-socket-not-connected error, which implies that an
      earlier error during connection setup is not being checked, but it is
      an improvement over the current behaviour.
      
      Updates #14539.
      
      Change-Id: I0571a752d32d5303db48149ab448226868b19495
      Reviewed-on: https://go-review.googlesource.com/19990Reviewed-by: default avatarAdam Langley <agl@golang.org>
      37c28759
    • David Crawshaw's avatar
      cmd/link: C is gone, remove check for Go calling C · 1012892f
      David Crawshaw authored
      It looks like the compiler still uses the Cfunc flag for functions
      marked as //go:systemstack, but if I'm reading this right, that
      doesn't apply here and the linker no longer needs Cfunc.
      
      Change-Id: I63b9192c2f52f41401263c29dc8dfd8be8a901a1
      Reviewed-on: https://go-review.googlesource.com/20105
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      1012892f
    • Joe Tsai's avatar
      compress/bzip2: prevent zero-length Huffman codes · 8b360d5f
      Joe Tsai authored
      Unlike RFC 1951 (DEFLATE), bzip2 does not use zero-length Huffman codes
      to indicate that the symbol is missing. Instead, bzip2 uses a sparse
      bitmap to indicate which symbols are present. Thus, it is undefined what
      happens when a length of zero is used. Thus, fix the parsing logic so that
      the length cannot ever go below 1-bit similar to how the C logic does things.
      
      To confirm that the C bzip2 utility chokes on this data:
      	$ echo "425a6836314159265359b1f7404b000000400040002000217d184682ee48
      	a70a12163ee80960" | xxd -r -p | bzip2 -d
      
      	bzip2: Data integrity error when decompressing
      
      For reference see:
      	bzip2-1.0.6/decompress.c:320
      
      Change-Id: Ic1568f8e7f80cdea51d887b4d712cc239c2fe85e
      Reviewed-on: https://go-review.googlesource.com/20119
      Run-TryBot: Joe Tsai <joetsai@digital-static.net>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      8b360d5f
    • Mohit Agarwal's avatar
      net: fix vet warnings · 1c94e727
      Mohit Agarwal authored
      Updates #11041
      
      Change-Id: I12c20beab75d7981efe470eb418e4b58dc8eb066
      Reviewed-on: https://go-review.googlesource.com/20002Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      1c94e727
    • David Crawshaw's avatar
      cmd/link: rename Hide to Hidden and make a bool · 0d1a98e2
      David Crawshaw authored
      Change-Id: Ic99bd63c96b1eba5cc2b5cd2be3a575890a02996
      Reviewed-on: https://go-review.googlesource.com/20103
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      Reviewed-by: default avatarDave Cheney <dave@cheney.net>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      0d1a98e2
    • David Crawshaw's avatar
      cmd/link: write DWARF PC table without seeking · 3601a1e7
      David Crawshaw authored
      This per-symbol table was written with the strategy:
      
      	1. record offset and write fake header
      	2. write body
      	3. seek back to fake header
      	4. write real header
      
      This CL collects the per-symbol body into a []byte, then writes the
      real header followed by the body to the output file. This saves two
      seeks per-symbol and overwriting the fake header.
      
      Small performance improvement (3.5%) in best-of-ten links of godoc:
      
      tip:  real 0m1.132s user 0m1.256s
      this: real 0m1.090s user 0m1.210s
      
      I'm not sure if the performance measured here alone justifies it,
      but I think this is an easier to read style of code.
      
      Change-Id: I1663901eb7c2ee330591b8b6550cdff0402ed5dc
      Reviewed-on: https://go-review.googlesource.com/20074Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      3601a1e7
    • David Crawshaw's avatar
      cmd/link: add array append version of methods · 021e0c5f
      David Crawshaw authored
      Used by DWARF writer changes in a followup CL.
      
      Change-Id: I6ec40dcfeaba909d9b8f6cf2603bc5b85c1fa873
      Reviewed-on: https://go-review.googlesource.com/20073Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      021e0c5f
    • Keith Randall's avatar
      cmd/compile: some SSA cleanup · 62ac107a
      Keith Randall authored
      Do some easy TODOs.
      Move a bunch of other TODOs into bugs.
      
      Change-Id: Iaba9dad6221a2af11b3cbcc512875f4a85842873
      Reviewed-on: https://go-review.googlesource.com/20114
      Run-TryBot: Todd Neal <todd@tneal.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarTodd Neal <todd@tneal.org>
      62ac107a
    • Brad Fitzpatrick's avatar
      net/url: fix parsing of URLs ending in question mark · 3afbb690
      Brad Fitzpatrick authored
      Fixes parsing regression from https://golang.org/cl/19931 which
      added the URL.ForceQuery field.
      
      Fixes #14573
      
      Change-Id: I89575cab3f778b1bf78b2389623c866450b26943
      Reviewed-on: https://go-review.googlesource.com/20116
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
      3afbb690
    • Robert Griesemer's avatar
      cmd/compile: give SymFlags type to Sym flags · 37c29727
      Robert Griesemer authored
      Change-Id: Ifa65a35418c2b5a2c517c0d9bbe37f472091e759
      Reviewed-on: https://go-review.googlesource.com/20115
      Run-TryBot: Robert Griesemer <gri@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      37c29727
    • Marvin Stenger's avatar
      cmd/vet: polish output of shadow test · a8d4463e
      Marvin Stenger authored
      This commit modifies the style of a error message in case of -shadow.
      
      Previously such a message would look like:
      foo.go:42: declaration of err shadows declaration at shadow.go:13:
      
      Changes of the commit include highlighting the variable name and
      removing the ": "(space intended) at the end of the line:
      foo.go:42: declaration of "err" shadows declaration at shadow.go:13
      
      Fixes #14585.
      
      Change-Id: Ia6a6bf396668dcba9a24f025a08d8826db31f434
      Reviewed-on: https://go-review.googlesource.com/20093Reviewed-by: default avatarRob Pike <r@golang.org>
      a8d4463e
    • Brad Fitzpatrick's avatar
      all: single space after period. · 5fea2ccc
      Brad Fitzpatrick authored
      The tree's pretty inconsistent about single space vs double space
      after a period in documentation. Make it consistently a single space,
      per earlier decisions. This means contributors won't be confused by
      misleading precedence.
      
      This CL doesn't use go/doc to parse. It only addresses // comments.
      It was generated with:
      
      $ perl -i -npe 's,^(\s*// .+[a-z]\.)  +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.)  +([A-Z])')
      $ go test go/doc -update
      
      Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
      Reviewed-on: https://go-review.googlesource.com/20022Reviewed-by: default avatarRob Pike <r@golang.org>
      Reviewed-by: default avatarDave Day <djd@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      5fea2ccc
    • Ian Lance Taylor's avatar
      cmd/compile: fix OADDSTR buffer size calculation · 8b4deb44
      Ian Lance Taylor authored
      The size calculation has been wrong since this code was first committed
      in https://golang.org/cl/3120.  The effect was that the compiler always
      allocated a temporary buffer on the stack for a non-escaping string
      concatenation.  This turns out to make no practical difference, as the
      compiler always allocates a buffer of the same size (32 bytes) and the
      runtime only uses the temporary buffer if the concatenated strings
      fit (check is in rawstringtmp in runtime/string.go).
      
      The effect of this change is to avoid generating a temporary buffer on
      the stack that will not be used.
      
      Change-Id: Id632bfe3d6c113c9934c018a2dd4bcbf1784a63d
      Reviewed-on: https://go-review.googlesource.com/20112
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      8b4deb44
  2. 01 Mar, 2016 23 commits
  3. 29 Feb, 2016 1 commit