1. 04 Mar, 2016 6 commits
  2. 03 Mar, 2016 25 commits
  3. 02 Mar, 2016 9 commits
    • Alex Brainman's avatar
      misc/cgo/test: rewrite windows version of mysleep · 03f3bfc4
      Alex Brainman authored
      Latest version of gcc (tdm-1) 5.1.0 refuses to compile our code
      on windows/386 (see issue for details). Rewrite the code.
      
      Fixes #14328
      
      Change-Id: I70f4f063282bd2958cd2175f3974369dd49dd8dc
      Reviewed-on: https://go-review.googlesource.com/20008Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      03f3bfc4
    • David Crawshaw's avatar
      cmd/link: make Allsym a slice · 4b92cd4e
      David Crawshaw authored
      Looks a tiny bit faster, which is a surprise. Probably noise.
      Motivation is making the LSym structure a little easier to understand.
      
      Linking juju, best of 10:
      
      before: real 0m4.811s user 0m5.582s
      after:  real 0m4.611s user 0m5.267s
      
      Change-Id: Idbedaf4a6e6e199036a1bbb6760e98c94ed2c282
      Reviewed-on: https://go-review.googlesource.com/20142Reviewed-by: default avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      4b92cd4e
    • Robert Griesemer's avatar
      cmd/compile/internal/gc: export & import function bodies, but don't hook up · 45983827
      Robert Griesemer authored
      Function bodies are not yet hooked up because the node structure is not
      100% correct. This commit establishes that we can correctly write bodies
      out and read them in again.
      
      - export and import all exported inlined function bodies:
        (export GO_GCFLAGS="-newexport"; sh all.bash) working
      - inlined functions are not yet hooked up (just dropped on the floor)
      - improved tracing output and error messages
      - make mkbuiltin.go work for both textual and binary export data
        so we can run tests with the new format
      
      Change-Id: I70dc4de419df1b604389c3747041d6dba8730b0b
      Reviewed-on: https://go-review.googlesource.com/16284Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      45983827
    • David Crawshaw's avatar
      cmd/link: replace custom hashmap in DWARF writer · c0f7195d
      David Crawshaw authored
      Also stop creating a map for each symbol, as it does not seem to help.
      
      Linking juju:
      	tip:  real 0m5.470s user 0m6.131s
      	this: real 0m4.811s user 0m5.582s
      
      Change-Id: Ib3d931c996396a00942581770ff32df1eb8d6615
      Reviewed-on: https://go-review.googlesource.com/20140
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      c0f7195d
    • David Chase's avatar
      cmd/compile: trunc(and(x,K)) rewrite to trunc(x) for some K · 97b2295f
      David Chase authored
      uint8(s.b & 0xff) ought to produce same code as uint8(s.b)
      but it did not.  RLH found this one looking for moles to
      whack in the GC code.
      
      Change-Id: I883d68ec7a5746d652712be84a274a11256b3b33
      Reviewed-on: https://go-review.googlesource.com/20141Reviewed-by: default avatarKeith Randall <khr@golang.org>
      97b2295f
    • Robert Griesemer's avatar
      cmd/compile: remove missed int(lineno) conversions · 3a880bae
      Robert Griesemer authored
      Follow-up to https://go-review.googlesource.com/20131 .
      
      Change-Id: Id8351fa39f24e6ea488cdbfcb855b69a31ffff31
      Reviewed-on: https://go-review.googlesource.com/20134
      Run-TryBot: Robert Griesemer <gri@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      3a880bae
    • Martin Möhrmann's avatar
      fmt: optimize string truncation · 83765d13
      Martin Möhrmann authored
      Count only the runes up to the requested precision
      to decide where to truncate a string.
      
      Change the loop within truncate to need fewer jumps.
      
      name                     old time/op  new time/op  delta
      SprintfTruncateString-2   188ns ± 3%   155ns ± 3%  -17.43%  (p=0.000 n=20+20)
      
      Change-Id: I17ca9fc0bb8bf7648599df48e4785251bbc31e99
      Reviewed-on: https://go-review.googlesource.com/20098Reviewed-by: default avatarRob Pike <r@golang.org>
      83765d13
    • Robert Griesemer's avatar
      cmd/compile: introduce linestr helper to simplify line reporting · 2faf5bca
      Robert Griesemer authored
      Change-Id: Ic9ca792b55cc4ebd0ac6cfa2fbdb58030893bacd
      Reviewed-on: https://go-review.googlesource.com/20132
      Run-TryBot: Robert Griesemer <gri@golang.org>
      Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      2faf5bca
    • 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