Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
golang/go
0xmohit/go
95rangerxlt/go
Acidburn0zzz/go
Amd64R/go-1
Anthonymcqueen21/go
AnuchitO/go
Ares2013/go
BPI-SINOVOIP/go
BPing/go
BlackEragon/go
BubbleEric/go
Buddhilive/go
CNXTEoEorg/go
Caplost/go
ChiefMage/go
Citizenxin/go
DanielMorsing/go
Davidzhu001/go-1
Demznak/go
FiloSottile/go
GerogeZero/go
GoesToEleven/go
GuSWRolland/go
HCLAC/go
HogLang/hog
Hossein1995/go
Janatbek/go
JeremyChenn/go
Joyionline/go
JsCrimson/go
LgJianzhao/go
LittleRiverLian/go
LouisJenkinsCS/Go_With_Concurrent_Map_Builtin
March4/go
MarcusChang/go
Ndekere/go
OlgorittRobot/go
PEPE-net/go
Patrickofdyq/go
PhillipSz/go
RiverLempel/go
Rojackse/go
SeungKyun/go
SouthernCharmz/go
SpiderOak/go
SpivEgin/go
Sreng-S/go
TangTHL/go
TelegramSupport/go
TheByteKnight/go
VFOXITChick/go
VukDukic/go
WEI-HE/go
XenoAmess/go-free
Young55555/go
ZoranWong/go
aatmaca/go
adamgj/go
aj07/go
akaros/go-akaros
alash3al/go
alcret/go
alexrao/go
algorithmically/go
alimnastaev/go
aminger/go
amirdaneshvar/go
anlhord/go
anydream/gg
ascheglov/go
bernerdschaefer/atman
blackkking/go
boolinking/go
bruceloo/go
cag/go
cchamplin/go
ceseo/go
chenange/go
chenduzi/go
chmodawk/go
christopher-henderson/GoSearch
cookerzhu/go
cxytujie/go
cyberroadie/go-sctp
cyysu/go
dangen-effy/go
deeokay/go
devfeel/go
dhirajsharma/go
dlg-yahoo/go
dojotech/go
dsw0214/go
dvandra/go
ercanucan/go
ericlakich/go
freeliver/go
freezehe/go
gavinzhs/go
gdey/go
getlantern/go
githubwbs/go-1
glaubitz/go
gopher-lang/gopher
gtd138/go
haylhf/go
henrylee2cn/go
hnes/go-tool-trace-greediest-goroutines
hsiven/go
ibrahimdraidia/go
iexpos/go
iftikharuddin/go
imagineagents/go
imkira/go
jessicah/go
jjjhrl/go
johnkushkorov/go
josuamarcelc/go
jpoirier/go
khamuul/go
kingslair/go
lattera/go
leizhendong/go
letsencrypt/go
lifeNrun/go
linux-on-ibm-z/go
linxueyi2230/go
lokifist/go
lokistone/go
lucasmrthomaz/go
luisulbaranleonTSCI/go
luoyangen/go
macressler/go
marzwu/go
mcanthony/go
mengqingshare/go
mesb/go
mike10001/go
mingodad/go
minux/goios
mittywalter/go
mmcloughlin/go
mrmuxl/go
msn217/go
nadiasvertex/go
nataliegryphon/go
neelance/go
niilante/go
noodmaketest/go
nuuyoo/go
opptinmer/go
palmin/go
peterfarouk01/go
philhofer/go
phuslu/go
polaris1119/go
powertechpreview/go
qinchao0525/go
qxj006/go
rare/go
rdterner/go
roth1002/go
rsc/go
sakishum/go
sebastianviera/go
shadowsocks/go
shae1988/go
shailesh17/go
shenjinxi/go
shijuvar/go
shyamalschandra/go
sky101010ws/go
slavau/go
smallerhand/go
soloos/go
status-im/go
stormltf/go
sujiahong/go
sujunbo/go
tgin/go
u35s/go
v2pro/koala-go
varver/go
wfw727/go
woollplus/go
worawit/go
wubob/go
xiezhenye/go
ximiabc/go
xizhixing/go
xuanxinhuiqing/go
xuhaitao/go
yell-li/go
ylck/go
yuriigithub/go
zcwfeng/go
zhangdianchao/go
zhouzhengde/go
zmoon111/go
zwyzzu/go
Nothing to show
Choose a Head Repository
golang/go
0xmohit/go
95rangerxlt/go
Acidburn0zzz/go
Amd64R/go-1
Anthonymcqueen21/go
AnuchitO/go
Ares2013/go
BPI-SINOVOIP/go
BPing/go
BlackEragon/go
BubbleEric/go
Buddhilive/go
CNXTEoEorg/go
Caplost/go
ChiefMage/go
Citizenxin/go
DanielMorsing/go
Davidzhu001/go-1
Demznak/go
FiloSottile/go
GerogeZero/go
GoesToEleven/go
GuSWRolland/go
HCLAC/go
HogLang/hog
Hossein1995/go
Janatbek/go
JeremyChenn/go
Joyionline/go
JsCrimson/go
LgJianzhao/go
LittleRiverLian/go
LouisJenkinsCS/Go_With_Concurrent_Map_Builtin
March4/go
MarcusChang/go
Ndekere/go
OlgorittRobot/go
PEPE-net/go
Patrickofdyq/go
PhillipSz/go
RiverLempel/go
Rojackse/go
SeungKyun/go
SouthernCharmz/go
SpiderOak/go
SpivEgin/go
Sreng-S/go
TangTHL/go
TelegramSupport/go
TheByteKnight/go
VFOXITChick/go
VukDukic/go
WEI-HE/go
XenoAmess/go-free
Young55555/go
ZoranWong/go
aatmaca/go
adamgj/go
aj07/go
akaros/go-akaros
alash3al/go
alcret/go
alexrao/go
algorithmically/go
alimnastaev/go
aminger/go
amirdaneshvar/go
anlhord/go
anydream/gg
ascheglov/go
bernerdschaefer/atman
blackkking/go
boolinking/go
bruceloo/go
cag/go
cchamplin/go
ceseo/go
chenange/go
chenduzi/go
chmodawk/go
christopher-henderson/GoSearch
cookerzhu/go
cxytujie/go
cyberroadie/go-sctp
cyysu/go
dangen-effy/go
deeokay/go
devfeel/go
dhirajsharma/go
dlg-yahoo/go
dojotech/go
dsw0214/go
dvandra/go
ercanucan/go
ericlakich/go
freeliver/go
freezehe/go
gavinzhs/go
gdey/go
getlantern/go
githubwbs/go-1
glaubitz/go
gopher-lang/gopher
gtd138/go
haylhf/go
henrylee2cn/go
hnes/go-tool-trace-greediest-goroutines
hsiven/go
ibrahimdraidia/go
iexpos/go
iftikharuddin/go
imagineagents/go
imkira/go
jessicah/go
jjjhrl/go
johnkushkorov/go
josuamarcelc/go
jpoirier/go
khamuul/go
kingslair/go
lattera/go
leizhendong/go
letsencrypt/go
lifeNrun/go
linux-on-ibm-z/go
linxueyi2230/go
lokifist/go
lokistone/go
lucasmrthomaz/go
luisulbaranleonTSCI/go
luoyangen/go
macressler/go
marzwu/go
mcanthony/go
mengqingshare/go
mesb/go
mike10001/go
mingodad/go
minux/goios
mittywalter/go
mmcloughlin/go
mrmuxl/go
msn217/go
nadiasvertex/go
nataliegryphon/go
neelance/go
niilante/go
noodmaketest/go
nuuyoo/go
opptinmer/go
palmin/go
peterfarouk01/go
philhofer/go
phuslu/go
polaris1119/go
powertechpreview/go
qinchao0525/go
qxj006/go
rare/go
rdterner/go
roth1002/go
rsc/go
sakishum/go
sebastianviera/go
shadowsocks/go
shae1988/go
shailesh17/go
shenjinxi/go
shijuvar/go
shyamalschandra/go
sky101010ws/go
slavau/go
smallerhand/go
soloos/go
status-im/go
stormltf/go
sujiahong/go
sujunbo/go
tgin/go
u35s/go
v2pro/koala-go
varver/go
wfw727/go
woollplus/go
worawit/go
wubob/go
xiezhenye/go
ximiabc/go
xizhixing/go
xuanxinhuiqing/go
xuhaitao/go
yell-li/go
ylck/go
yuriigithub/go
zcwfeng/go
zhangdianchao/go
zhouzhengde/go
zmoon111/go
zwyzzu/go
Nothing to show
Commits on Jul 08, 2016
runtime: fix nanotime for macOS Sierra
In the beta version of the macOS Sierra (10.12) release, the
gettimeofday system call changed on x86. Previously it always returned
the time in the AX/DX registers. Now, if AX is returned as 0, it means
that the system call has stored the values into the memory pointed to by
the first argument, just as the libc gettimeofday function does. The
libc function handles both cases, and we need to do so as well.

Fixes #16272.

Change-Id: Ibe5ad50a2c5b125e92b5a4e787db4b5179f6b723
Reviewed-on: https://go-review.googlesource.com/24812
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
doc/go1.7.html: fix name of IsExist
For better or for worse, it's IsExist, not IsExists.

Change-Id: I4503f961486edd459c0c81cf3f32047dff7703a4
Reviewed-on: https://go-review.googlesource.com/24819
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
runtime: fix case in KeepAlive comment
Fixes #16299.

Change-Id: I76f541c7f11edb625df566f2f1035147b8bcd9dd
Reviewed-on: https://go-review.googlesource.com/24830
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
syscall: add another output for TestGroupCleanupUserNamespace
Fixes #16303.

Change-Id: I2832477ce0117a66da53ca1f198ebb6121953d56
Reviewed-on: https://go-review.googlesource.com/24833
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Jul 11, 2016
net/http: fix vet warning of leaked context in error paths
Updates #16230

Change-Id: Ie38f85419c41c00108f8843960280428a39789b5
Reviewed-on: https://go-review.googlesource.com/24850
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
math/rand: fix raciness in Rand.Read
There are no synchronization points protecting the readVal and readPos
variables. This leads to a race when Read is called concurrently.
Fix this by adding methods to lockedSource, which is the case where
a race matters.

Fixes #16308.

Change-Id: Ic028909955700906b2d71e5c37c02da21b0f4ad9
Reviewed-on: https://go-review.googlesource.com/24852
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
doc/go1.7.html: no concurrent calls of math/rand methods
A follow-on to https://golang.org/cl/24852 that mentions the
documentation clarifications.

Updates #16308.

Change-Id: Ic2a6e1d4938d74352f93a6649021fb610efbfcd0
Reviewed-on: https://go-review.googlesource.com/24857
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
gofmt: remove unneeded call to os.Exit
PrintDefaults already calls os.Exit(2).

Change-Id: I0d783a6476f42b6157853cdb34ba69618e3f3fcb
Reviewed-on: https://go-review.googlesource.com/24844
Reviewed-by: Andrew Gerrand <adg@golang.org>
regexp: add the Fanout benchmark
This is a copy of the "FANOUT" benchmark recently added to RE2 with the
following comment:

    // This has quite a high degree of fanout.
    // NFA execution will be particularly slow.

Most of the benchmarks on the regexp package have very little fanout and
are designed for comparing the regexp package's NFA with backtracking
engines found in other regular expression libraries. This benchmark
exercises the performance of the NFA on expressions with high fanout.

Change-Id: Ie9c8e3bbeffeb1fe9fb90474ddd19e53f2f57a52
Reviewed-on: https://go-review.googlesource.com/24846
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Commits on Jul 12, 2016
Revert "regexp: add the Fanout benchmark
This is a copy of the "FANOUT" benchmark recently added to RE2 with the
following comment:

    // This has quite a high degree of fanout.
    // NFA execution will be particularly slow.

Most of the benchmarks on the regexp package have very little fanout and
are designed for comparing the regexp package's NFA with backtracking
engines found in other regular expression libraries. This benchmark
exercises the performance of the NFA on expressions with high fanout.Reviewed-on: https://go-review.googlesource.com/24846
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
"

This reverts commit fc80387.

Reason for revert: Breaks the -race build because the benchmark takes too long to run.

Change-Id: I6ed4b466f74a4108d8bcd5b019b9abe971eb483e
Reviewed-on: https://go-review.googlesource.com/24861
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
reflect: an unnamed type has no PkgPath
The reflect package was returning a non-empty PkgPath for an unnamed
type with methods, such as a type whose methods have a pointer
receiver.

Fixes #16328.

Change-Id: I733e93981ebb5c5c108ef9b03bf5494930b93cf3
Reviewed-on: https://go-review.googlesource.com/24862
Reviewed-by: David Crawshaw <crawshaw@golang.org>
runtime: add ctxt parameter to cgocallback called from Go
The cgocallback function picked up a ctxt parameter in CL 22508.
That CL updated the assembler implementation, but there are a few
mentions in Go code that were not updated. This CL fixes that.

Fixes #16326

Change-Id: I5f68e23565c6a0b11057aff476d13990bff54a66
Reviewed-on: https://go-review.googlesource.com/24848
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
cmd/go: don't fail on invalid GOOS/GOARCH pair when using gccgo
Fixes #12272

Change-Id: I0306ce0ef4a87df2158df3b7d4d8d93a1cb6dabc
Reviewed-on: https://go-review.googlesource.com/24864
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Commits on Jul 13, 2016
doc/effective_go: clarify advice on returning interfaces
New Gophers sometimes misconstrue the advice in the "Generality" section
as "export interfaces instead of implementations" and add needless
interfaces to their code as a result.  Down the road, they end up
needing to add methods and either break existing callers or have to
resort to unpleasant hacks (e.g. using "magic method" type-switches).

Weaken the first paragraph of this section to only advise leaving types
unexported when they will never need additional methods.

Change-Id: I32a1ae44012b5896faf167c02e192398a4dfc0b8
Reviewed-on: https://go-review.googlesource.com/24892
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
doc/go1.7.html: document that http.Server now enforces request versions
Document that the http.Server is now stricter about rejecting
requests with invalid HTTP versions, and also that it rejects plaintext
HTTP/2 requests, except for `PRI * HTTP/2.0` upgrade requests.
The relevant CL is https://golang.org/cl/24505.

Updates #15810.

Change-Id: Ibbace23e001b5e2eee053bd341de50f9b6d3fde8
Reviewed-on: https://go-review.googlesource.com/24731
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
doc/go1.7.html: earlier Go versions don't work on macOS Sierra
Updates #16272.

Change-Id: If5444b8de8678eeb9be10b62a929e2e101d1dd91
Reviewed-on: https://go-review.googlesource.com/24900
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
all: rename vendored golang.org/x/net packages to golang_org
Regression from Go 1.6 to Go 1.7rc1: we had broken the ability for
users to vendor "golang.org/x/net/http2" or "golang.org/x/net/route"
because we were vendoring them ourselves and cmd/go and cmd/compile do
not understand multiple vendor directories across multiple GOPATH
workspaces (e.g. user's $GOPATH and default $GOROOT).

As a short-term fix, since fixing cmd/go and cmd/compile is too
invasive at this point in the cycle, just rename "golang.org" to
"golang_org" for the standard library's vendored copy.

Fixes #16333

Change-Id: I9bfaed91e9f7d4ca6bab07befe80d71d437a21af
Reviewed-on: https://go-review.googlesource.com/24902
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
runtime/pprof: don't print extraneous 0 after goexit
This fixes erroneous handling of the more result parameter of
runtime.Frames.Next.

Fixes #16349.

Change-Id: I4f1c0263dafbb883294b31dbb8922b9d3e650200
Reviewed-on: https://go-review.googlesource.com/24911
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Jul 14, 2016
runtime/internal/atomic: fix assembly arg sizes
Change-Id: I80ccf40cd3930aff908ee64f6dcbe5f5255198d3
Reviewed-on: https://go-review.googlesource.com/24914
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Commits on Jul 15, 2016
doc/go1.7.html: remove erroneous note about ppc64 and power8
We decided that ppc64 should maintain power5 compatibility.
ppc64le requires power8.

Fixes #16372.

Change-Id: If5b309a0563f55a3c1fe9c853d29a463f5b71101
Reviewed-on: https://go-review.googlesource.com/24915
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Jul 16, 2016
fmt: properly handle early io.EOF Reads in readRune.readByte
Change https://golang.org/cl/19895 caused a regression
where the last character in a string would be dropped if it was
accompanied by an io.EOF.

This change fixes the logic so that the last byte is still returned
without a problem.

Fixes #16393

Change-Id: I7a4d0abf761c2c15454136a79e065fe002d736ea
Reviewed-on: https://go-review.googlesource.com/24981
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Jul 17, 2016
net: demote TestDialerDualStack to a flaky test
Only run TestDialerDualStack on the builders, as to not annoy or
otherwise distract users when it's not their fault.

Even though the intention is to only run this on the builders, very
few of the builders have IPv6 support. Oh well. We'll get some
coverage.

Updates #13324

Change-Id: I13e7e3bca77ac990d290cabec88984cc3d24fb67
Reviewed-on: https://go-review.googlesource.com/24985
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Commits on Jul 18, 2016
doc/go1.7.html: mention specific runtime improvements
Most of the runtime improvements are hard to quantify or summarize,
but it's worth mentioning some of the substantial improvements in STW
time, and that the scavenger now actually works on ARM64, PPC64, and
MIPS.

Change-Id: I0e951038516378cc3f95b364716ef1c183f3445a
Reviewed-on: https://go-review.googlesource.com/24966
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
net/http, net/http/cgi: fix for CGI + HTTP_PROXY security issue
Because,

* The CGI spec defines that incoming request header "Foo: Bar" maps to
  environment variable HTTP_FOO == "Bar". (see RFC 3875 4.1.18)

* The HTTP_PROXY environment variable is conventionally used to configure
  the HTTP proxy for HTTP clients (and is respected by default for
  Go's net/http.Client and Transport)

That means Go programs running in a CGI environment (as a child
process under a CGI host) are vulnerable to an incoming request
containing "Proxy: attacker.com:1234", setting HTTP_PROXY, and
changing where Go by default proxies all outbound HTTP requests.

This is CVE-2016-5386, aka https://httpoxy.org/

Fixes #16405

Change-Id: I6f68ade85421b4807785799f6d98a8b077e871f0
Reviewed-on: https://go-review.googlesource.com/25010
Run-TryBot: Chris Broadfoot <cbro@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
doc: document go1.6.3
Change-Id: Ib33d7fb529aafcaf8ca7d43b2c9480f30d5c28cc
Reviewed-on: https://go-review.googlesource.com/25011
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
doc/go1.7.html: the 1.6.3 release supports Sierra
Updates #16354
Updates #16272

Change-Id: I73e8df40621a0a17a1990f3b10ea996f4fa738aa
Reviewed-on: https://go-review.googlesource.com/25014
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
doc/go1.7.html: avoid term of art
Rather than saying "stop-the-world", say "garbage collection pauses".

Change-Id: Ifb2931781ab3094e04bea93f01f18f1acb889bdc
Reviewed-on: https://go-review.googlesource.com/25018
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
doc/go1.7.html: start sentence on a new line
Change-Id: Ia1c2ebcd2ccf7b98d89b378633bf4fc435d2364d
Reviewed-on: https://go-review.googlesource.com/25019
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Jul 20, 2016
net/smtp: document that the smtp package is frozen
This copies the frozen wording from the log/syslog package.

Fixes #16436

Change-Id: If5d478023328925299399f228d8aaf7fb117c1b4
Reviewed-on: https://go-review.googlesource.com/25080
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
runtime: add as many extra M's as needed
When a non-Go thread calls into Go, the runtime needs an M to run the Go
code. The runtime keeps a list of extra M's available. When the last
extra M is allocated, the needextram field is set to tell it to allocate
a new extra M as soon as it is running in Go. This ensures that an extra
M will always be available for the next thread.

However, if many threads need an extra M at the same time, this
serializes them all. One thread will get an extra M with the needextram
field set. All the other threads will see that there is no M available
and will go to sleep. The one thread that succeeded will create a new
extra M. One lucky thread will get it. All the other threads will see
that there is no M available and will go to sleep. The effect is
thundering herd, as all the threads looking for an extra M go through
the process one by one. This seems to have a particularly bad effect on
the FreeBSD scheduler for some reason.

With this change, we track the number of threads waiting for an M, and
create all of them as soon as one thread gets through. This still means
that all the threads will fight for the lock to pick up the next M. But
at least each thread that gets the lock will succeed, instead of going
to sleep only to fight again.

This smooths out the performance greatly on FreeBSD, reducing the
average wall time of `testprogcgo CgoCallbackGC` by 74%.  On GNU/Linux
the average wall time goes down by 9%.

Fixes #13926
Fixes #16396

Change-Id: I6dc42a4156085a7ed4e5334c60b39db8f8ef8fea
Reviewed-on: https://go-review.googlesource.com/25047
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
runtime/race: fix memory leak
The leak was reported internally on a sever canary that runs for days.
After a day server consumes 5.6GB, after 6 days -- 12.2GB.
The leak is exposed by the added benchmark.
The leak is fixed upstream in :
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc?view=diff&r1=276102&r2=276103&pathrev=276103

Fixes #16441

Change-Id: I9d4f0adef48ca6cf2cd781b9a6990ad4661ba49b
Reviewed-on: https://go-review.googlesource.com/25091
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
runtime: support smaller physical pages than PhysPageSize
Most operations need an upper bound on the physical page size, which
is what sys.PhysPageSize is for (this is checked at runtime init on
Linux). However, a few operations need a *lower* bound on the physical
page size. Introduce a "minPhysPageSize" constant to act as this lower
bound and use it where it makes sense:

1) In addrspace_free, we have to query each page in the given range.
   Currently we increment by the upper bound on the physical page
   size, which means we may skip over pages if the true size is
   smaller. Worse, we currently pass a result buffer that only has
   enough room for one page. If there are actually multiple pages in
   the range passed to mincore, the kernel will overflow this buffer.
   Fix these problems by incrementing by the lower-bound on the
   physical page size and by passing "1" for the length, which the
   kernel will round up to the true physical page size.

2) In the write barrier, the bad pointer check tests for pointers to
   the first physical page, which are presumably small integers
   masquerading as pointers. However, if physical pages are smaller
   than we think, we may have legitimate pointers below
   sys.PhysPageSize. Hence, use minPhysPageSize for this test since
   pointers should never fall below that.

In particular, this applies to ARM64 and MIPS. The runtime is
configured to use 64kB pages on ARM64, but by default Linux uses 4kB
pages. Similarly, the runtime assumes 16kB pages on MIPS, but both 4kB
and 16kB kernel configurations are common. This also applies to ARM on
systems where the runtime is recompiled to deal with a larger page
size. It is also a step toward making the runtime use only a
dynamically-queried page size.

Change-Id: I1fdfd18f6e7cbca170cc100354b9faa22fde8a69
Reviewed-on: https://go-review.googlesource.com/25020
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Commits on Jul 21, 2016
runtime: add explicit `INT $3` at end of Darwin amd64 sigtramp
The omission of this instruction could confuse the traceback code if a
SIGPROF occurred during a signal handler.  The traceback code would
trace up to sigtramp, but would then get confused because it would see a
PC address that did not appear to be in the function.

Fixes #16453.

Change-Id: I2b3d53e0b272fb01d9c2cb8add22bad879d3eebc
Reviewed-on: https://go-review.googlesource.com/25104
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
cmd/compile: move phi args which are constants closer to the phi
entry:
   x = MOVQconst [7]
   ...
b1:
   goto b2
b2:
   v = Phi(x, y, z)

Transform that program to:

entry:
   ...
b1:
   x = MOVQconst [7]
   goto b2
b2:
   v = Phi(x, y, z)

This CL moves constant-generating instructions used by a phi to the
appropriate immediate predecessor of the phi's block.

We used to put all constants in the entry block.  Unfortunately, in
large functions we have lots of constants at the start of the
function, all of which are used by lots of phis throughout the
function.  This leads to the constants being live through most of the
function (especially if there is an outer loop).  That's an O(n^2)
problem.

Note that most of the non-phi uses of constants have already been
folded into instructions (ADDQconst, MOVQstoreconst, etc.).

This CL may be generally useful for other instances of compiler
slowness, I'll have to check.  It may cause some programs to run
slower, but probably not by much, as rematerializeable values like
these constants are allocated late (not at their originally scheduled
location) anyway.

This CL is definitely a minimal change that can be considered for 1.7.
We probably want to do a better job in the tighten pass generally, not
just for phi args.  Leaving that for 1.8.

Update #16407

Change-Id: If112a8883b4ef172b2f37dea13e44bda9346c342
Reviewed-on: https://go-review.googlesource.com/25046
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
cmd/compile: change phi location to be optimistic at backedges
This is:

(1) a simple trick that cuts the number of phi-nodes
(temporarily) inserted into the ssa representation by a factor
of 10, and can cut the user time to compile tricky inputs like
gogo/protobuf tests from 13 user minutes to 9.5, and memory
allocation from 3.4GB to 2.4GB.

(2) a fix to sparse lookup, that does not rely on
an assumption proven false by at least one pathological
input "etldlen".

These two changes fix unrelated compiler performance bugs,
both necessary to obtain good performance compiling etldlen.
Without them it takes 20 minutes or longer, with them it
completes in 2 minutes, without a gigantic memory footprint.

Updates #16407

Change-Id: Iaa8aaa8c706858b3d49de1c4865a7fd79e6f4ff7
Reviewed-on: https://go-review.googlesource.com/23136
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
misc/trace: disable trace resolution warning
It was removed in upstream Chrome https://codereview.chromium.org/2016863004

Rather than update to the latest version, make the minimal change for Go 1.7 and
change the "showToUser" boolean from true to false.

Tested by hand that it goes away after this change.

Updates #16247

Change-Id: I051f49da878e554b1a34a88e9abc70ab50e18780
Reviewed-on: https://go-review.googlesource.com/25117
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
all: merge master into release-branch.go1.7
Change-Id: I2511c3f7583887b641c9b3694aae54789fbc5342
go1.7rc3
Change-Id: Iaef13003979c68926c260c415d6074a50ae137b2
Reviewed-on: https://go-review.googlesource.com/25142
Run-TryBot: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing with 420 additions and 192 deletions.
  1. +1 −1 VERSION
  2. +8 −0 doc/devel/release.html
  3. +6 −8 doc/effective_go.html
  4. +41 −2 doc/go1.7.html
  5. +1 −1 misc/trace/trace_viewer_lean.html
  6. +1 −1 src/cmd/api/goapi.go
  7. +4 −1 src/cmd/compile/internal/gc/sparselocatephifunctions.go
  8. +1 −0 src/cmd/compile/internal/ssa/compile.go
  9. +62 −42 src/cmd/compile/internal/ssa/sparsetreemap.go
  10. +23 −0 src/cmd/compile/internal/ssa/tighten.go
  11. +5 −5 src/cmd/go/build.go
  12. +0 −1 src/cmd/gofmt/gofmt.go
  13. +3 −3 src/fmt/scan.go
  14. +43 −58 src/fmt/scan_test.go
  15. +4 −4 src/go/build/build_test.go
  16. +4 −4 src/go/build/deps_test.go
  17. +47 −0 src/math/rand/race_test.go
  18. +37 −5 src/math/rand/rand.go
  19. +5 −0 src/net/dial_test.go
  20. +2 −2 src/net/http/h2_bundle.go
  21. +1 −1 src/net/http/http.go
  22. +3 −4 src/net/http/server.go
  23. +1 −1 src/net/http/transfer.go
  24. +1 −1 src/net/http/transport.go
  25. +1 −1 src/net/interface_bsd.go
  26. +1 −1 src/net/interface_bsdvar.go
  27. +1 −1 src/net/interface_darwin.go
  28. +1 −1 src/net/interface_freebsd.go
  29. +5 −0 src/net/smtp/smtp.go
  30. +2 −0 src/reflect/all_test.go
  31. +3 −0 src/reflect/type.go
  32. +3 −2 src/runtime/cgocall.go
  33. +3 −3 src/runtime/internal/atomic/asm_386.s
  34. +1 −1 src/runtime/internal/atomic/asm_amd64.s
  35. +2 −2 src/runtime/internal/atomic/asm_amd64p32.s
  36. +3 −3 src/runtime/internal/atomic/asm_arm.s
  37. +2 −2 src/runtime/internal/atomic/asm_arm64.s
  38. +1 −1 src/runtime/internal/atomic/asm_ppc64x.s
  39. +2 −2 src/runtime/mbarrier.go
  40. +14 −8 src/runtime/mem_linux.go
  41. +1 −1 src/runtime/mfinal.go
  42. +5 −0 src/runtime/mheap.go
  43. +1 −1 src/runtime/os_nacl.go
  44. +1 −4 src/runtime/pprof/pprof.go
  45. +4 −0 src/runtime/pprof/pprof_test.go
  46. +27 −1 src/runtime/proc.go
  47. +1 −1 src/runtime/race/README
  48. BIN src/runtime/race/race_darwin_amd64.syso
  49. BIN src/runtime/race/race_freebsd_amd64.syso
  50. BIN src/runtime/race/race_linux_amd64.syso
  51. +18 −0 src/runtime/race/race_test.go
  52. BIN src/runtime/race/race_windows_amd64.syso
  53. +1 −1 src/runtime/signal1_unix.go
  54. +2 −2 src/runtime/signal_darwin.go
  55. +2 −2 src/runtime/signal_freebsd.go
  56. +2 −2 src/runtime/signal_openbsd.go
  57. +2 −2 src/runtime/signal_sigtramp.go
  58. +2 −2 src/runtime/stubs.go
  59. +1 −0 src/runtime/sys_darwin_amd64.s
  60. +1 −0 src/syscall/exec_linux_test.go
  61. 0 src/vendor/{golang.org → golang_org}/x/net/http2/hpack/encode.go
  62. 0 src/vendor/{golang.org → golang_org}/x/net/http2/hpack/encode_test.go
  63. 0 src/vendor/{golang.org → golang_org}/x/net/http2/hpack/hpack.go
  64. 0 src/vendor/{golang.org → golang_org}/x/net/http2/hpack/hpack_test.go
  65. 0 src/vendor/{golang.org → golang_org}/x/net/http2/hpack/huffman.go
  66. 0 src/vendor/{golang.org → golang_org}/x/net/http2/hpack/tables.go
  67. 0 src/vendor/{golang.org → golang_org}/x/net/lex/httplex/httplex.go
  68. 0 src/vendor/{golang.org → golang_org}/x/net/lex/httplex/httplex_test.go
  69. 0 src/vendor/{golang.org → golang_org}/x/net/route/address.go
  70. 0 src/vendor/{golang.org → golang_org}/x/net/route/address_darwin_test.go
  71. 0 src/vendor/{golang.org → golang_org}/x/net/route/address_test.go
  72. 0 src/vendor/{golang.org → golang_org}/x/net/route/binary.go
  73. 0 src/vendor/{golang.org → golang_org}/x/net/route/defs_darwin.go
  74. 0 src/vendor/{golang.org → golang_org}/x/net/route/defs_dragonfly.go
  75. 0 src/vendor/{golang.org → golang_org}/x/net/route/defs_freebsd.go
  76. 0 src/vendor/{golang.org → golang_org}/x/net/route/defs_netbsd.go
  77. 0 src/vendor/{golang.org → golang_org}/x/net/route/defs_openbsd.go
  78. 0 src/vendor/{golang.org → golang_org}/x/net/route/interface.go
  79. 0 src/vendor/{golang.org → golang_org}/x/net/route/interface_announce.go
  80. 0 src/vendor/{golang.org → golang_org}/x/net/route/interface_classic.go
  81. 0 src/vendor/{golang.org → golang_org}/x/net/route/interface_freebsd.go
  82. 0 src/vendor/{golang.org → golang_org}/x/net/route/interface_multicast.go
  83. 0 src/vendor/{golang.org → golang_org}/x/net/route/interface_openbsd.go
  84. 0 src/vendor/{golang.org → golang_org}/x/net/route/message.go
  85. 0 src/vendor/{golang.org → golang_org}/x/net/route/message_darwin_test.go
  86. 0 src/vendor/{golang.org → golang_org}/x/net/route/message_freebsd_test.go
  87. 0 src/vendor/{golang.org → golang_org}/x/net/route/message_test.go
  88. 0 src/vendor/{golang.org → golang_org}/x/net/route/route.go
  89. 0 src/vendor/{golang.org → golang_org}/x/net/route/route_classic.go
  90. 0 src/vendor/{golang.org → golang_org}/x/net/route/route_openbsd.go
  91. 0 src/vendor/{golang.org → golang_org}/x/net/route/route_test.go
  92. 0 src/vendor/{golang.org → golang_org}/x/net/route/sys.go
  93. 0 src/vendor/{golang.org → golang_org}/x/net/route/sys_darwin.go
  94. 0 src/vendor/{golang.org → golang_org}/x/net/route/sys_dragonfly.go
  95. 0 src/vendor/{golang.org → golang_org}/x/net/route/sys_freebsd.go
  96. 0 src/vendor/{golang.org → golang_org}/x/net/route/sys_netbsd.go
  97. 0 src/vendor/{golang.org → golang_org}/x/net/route/sys_openbsd.go
  98. 0 src/vendor/{golang.org → golang_org}/x/net/route/syscall.go
  99. 0 src/vendor/{golang.org → golang_org}/x/net/route/syscall.s
  100. 0 src/vendor/{golang.org → golang_org}/x/net/route/zsys_darwin.go
  101. 0 src/vendor/{golang.org → golang_org}/x/net/route/zsys_dragonfly.go
  102. 0 src/vendor/{golang.org → golang_org}/x/net/route/zsys_freebsd_386.go
  103. 0 src/vendor/{golang.org → golang_org}/x/net/route/zsys_freebsd_amd64.go
  104. 0 src/vendor/{golang.org → golang_org}/x/net/route/zsys_freebsd_arm.go
  105. 0 src/vendor/{golang.org → golang_org}/x/net/route/zsys_netbsd.go
  106. 0 src/vendor/{golang.org → golang_org}/x/net/route/zsys_openbsd.go
View
@@ -1 +1 @@
go1.7rc2
go1.7rc3
View
@@ -53,6 +53,14 @@ <h3 id="go1.6.minor">Minor revisions</h3>
1.6.2 milestone</a> on our issue tracker for details.
</p>
<p>
go1.6.3 (released 2016/07/17) includes security fixes to the
<code>net/http/cgi</code> package and <code>net/http</code> package when used in
a CGI environment. This release also adds support for macOS Sierra.
See the <a href="https://github.com/golang/go/issues?q=milestone%3AGo1.6.3">Go
1.6.3 milestone</a> on our issue tracker for details.
</p>
<h2 id="go1.5">go1.5 (released 2015/08/19)</h2>
<p>
View
@@ -2238,13 +2238,12 @@ <h3 id="interface_conversions">Interface conversions and type assertions</h3>
<h3 id="generality">Generality</h3>
<p>
If a type exists only to implement an interface
and has no exported methods beyond that interface,
there is no need to export the type itself.
Exporting just the interface makes it clear that
it's the behavior that matters, not the implementation,
and that other implementations with different properties
can mirror the behavior of the original type.
If a type exists only to implement an interface and will
never have exported methods beyond that interface, there is
no need to export the type itself.
Exporting just the interface makes it clear the value has no
interesting behavior beyond what is described in the
interface.
It also avoids the need to repeat the documentation
on every instance of a common method.
</p>
@@ -3665,4 +3664,3 @@ <h2 id="web_server">A web server</h2>
var _ image.Image = Black
</pre>
-->
View
@@ -74,6 +74,13 @@ <h2 id="language">Changes to the language</h2>
<h2 id="ports">Ports</h2>
<p>
Go 1.7 adds support for macOS 10.12 Sierra.
This support was backported to Go 1.6.3.
Binaries built with versions of Go before 1.6.3 will not work
correctly on Sierra.
</p>
<p>
Go 1.7 adds an experimental port to <a href="https://en.wikipedia.org/wiki/Linux_on_z_Systems">Linux on z Systems</a> (<code>linux/s390x</code>)
and the beginning of a port to Plan 9 on ARM (<code>plan9/arm</code>).
@@ -85,8 +92,10 @@ <h2 id="ports">Ports</h2>
</p>
<p>
The experimental port to Linux on big-endian 64-bit PowerPC (<code>linux/ppc64</code>)
The experimental port to Linux on little-endian 64-bit PowerPC (<code>linux/ppc64le</code>)
now requires the POWER8 architecture or later.
Big-endian 64-bit PowerPC (<code>linux/ppc64</code>) only requires the
POWER5 architecture.
</p>
<p>
@@ -367,6 +376,12 @@ <h2 id="performance">Performance</h2>
packages.
</p>
<p>
Garbage collection pauses should be significantly shorter than they
were in Go 1.6 for programs with large numbers of idle goroutines,
substantial stack size fluctuation, or large package-level variables.
</p>
<h2 id="library">Core library</h2>
<h3 id="context">Context</h3>
@@ -462,6 +477,13 @@ <h3 id="runtime">Runtime</h3>
common in some environments.
</p>
<p>
The runtime can now return unused memory to the operating system on
all architectures.
In Go 1.6 and earlier, the runtime could not
release memory on ARM64, 64-bit PowerPC, or MIPS.
</p>
<p>
On Windows, Go programs in Go 1.5 and earlier forced
the global Windows timer resolution to 1ms at startup
@@ -793,6 +815,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
now produce a pseudo-random stream of bytes that is consistent and not
dependent on the size of the input buffer.
</p>
<p>
The documentation clarifies that
Rand's <a href="/pkg/math/rand/#Rand.Seed"><code>Seed</code></a>
and <a href="/pkg/math/rand/#Rand.Read"><code>Read</code></a> methods
are not safe to call concurrently, though the global
functions <a href="/pkg/math/rand/#Seed"><code>Seed</code></a>
and <a href="/pkg/math/rand/#Read"><code>Read</code></a> are (and have
always been) safe.
</p>
</dd>
</dl>
@@ -886,6 +918,13 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
is set explicitly, following <a href="https://tools.ietf.org/html/rfc7230#section-3.3.1">RFC 7230</a>.
</p>
<p>
The server implementation is now stricter about rejecting requests with invalid HTTP versions.
Invalid requests claiming to be HTTP/0.x are now rejected (HTTP/0.9 was never fully supported),
and plaintext HTTP/2 requests other than the "PRI * HTTP/2.0" upgrade request are now rejected as well.
The server continues to handle encrypted HTTP/2 requests.
</p>
<p>
In the server, a 200 status code is sent back by the timeout handler on an empty
response body, instead of sending back 0 as the status code.
@@ -1062,7 +1101,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
<dd>
<p>
<a href="/pkg/os/#IsExists"><code>IsExists</code></a> now returns true for <code>syscall.ENOTEMPTY</code>,
<a href="/pkg/os/#IsExist"><code>IsExist</code></a> now returns true for <code>syscall.ENOTEMPTY</code>,
on systems where that error exists.
</p>
@@ -5281,7 +5281,7 @@ <h2>General</h2>
importers.sort(function(x,y){return x.importPriority-y.importPriority;});},this);lastTask=lastTask.timedAfter('TraceImport',function importClockSyncMarkers(task){importers.forEach(function(importer,index){task.subTask(Timing.wrapNamedFunction('TraceImport',importer.importerName,function runImportClockSyncMarkersOnOneImporter(){progressMeter.update('Importing clock sync markers '+(index+1)+' of '+
importers.length);importer.importClockSyncMarkers();}),this);},this);},this);lastTask=lastTask.timedAfter('TraceImport',function runImport(task){importers.forEach(function(importer,index){task.subTask(Timing.wrapNamedFunction('TraceImport',importer.importerName,function runImportEventsOnOneImporter(){progressMeter.update('Importing '+(index+1)+' of '+importers.length);importer.importEvents();}),this);},this);},this);if(this.importOptions_.customizeModelCallback){lastTask=lastTask.timedAfter('TraceImport',function runCustomizeCallbacks(task){this.importOptions_.customizeModelCallback(this.model_);},this);}
lastTask=lastTask.timedAfter('TraceImport',function importSampleData(task){importers.forEach(function(importer,index){progressMeter.update('Importing sample data '+(index+1)+'/'+importers.length);importer.importSampleData();},this);},this);lastTask=lastTask.timedAfter('TraceImport',function runAutoclosers(){progressMeter.update('Autoclosing open slices...');this.model_.autoCloseOpenSlices();this.model_.createSubSlices();},this);lastTask=lastTask.timedAfter('TraceImport',function finalizeImport(task){importers.forEach(function(importer,index){progressMeter.update('Finalizing import '+(index+1)+'/'+importers.length);importer.finalizeImport();},this);},this);lastTask=lastTask.timedAfter('TraceImport',function runPreinits(){progressMeter.update('Initializing objects (step 1/2)...');this.model_.preInitializeObjects();},this);if(this.importOptions_.pruneEmptyContainers){lastTask=lastTask.timedAfter('TraceImport',function runPruneEmptyContainers(){progressMeter.update('Pruning empty containers...');this.model_.pruneEmptyContainers();},this);}
lastTask=lastTask.timedAfter('TraceImport',function runMergeKernelWithuserland(){progressMeter.update('Merging kernel with userland...');this.model_.mergeKernelWithUserland();},this);var auditors=[];lastTask=lastTask.timedAfter('TraceImport',function createAuditorsAndRunAnnotate(){progressMeter.update('Adding arbitrary data to model...');auditors=this.importOptions_.auditorConstructors.map(function(auditorConstructor){return new auditorConstructor(this.model_);},this);auditors.forEach(function(auditor){auditor.runAnnotate();auditor.installUserFriendlyCategoryDriverIfNeeded();});},this);lastTask=lastTask.timedAfter('TraceImport',function computeWorldBounds(){progressMeter.update('Computing final world bounds...');this.model_.computeWorldBounds(this.importOptions_.shiftWorldToZero);},this);lastTask=lastTask.timedAfter('TraceImport',function buildFlowEventIntervalTree(){progressMeter.update('Building flow event map...');this.model_.buildFlowEventIntervalTree();},this);lastTask=lastTask.timedAfter('TraceImport',function joinRefs(){progressMeter.update('Joining object refs...');this.model_.joinRefs();},this);lastTask=lastTask.timedAfter('TraceImport',function cleanupUndeletedObjects(){progressMeter.update('Cleaning up undeleted objects...');this.model_.cleanupUndeletedObjects();},this);lastTask=lastTask.timedAfter('TraceImport',function sortMemoryDumps(){progressMeter.update('Sorting memory dumps...');this.model_.sortMemoryDumps();},this);lastTask=lastTask.timedAfter('TraceImport',function finalizeMemoryGraphs(){progressMeter.update('Finalizing memory dump graphs...');this.model_.finalizeMemoryGraphs();},this);lastTask=lastTask.timedAfter('TraceImport',function initializeObjects(){progressMeter.update('Initializing objects (step 2/2)...');this.model_.initializeObjects();},this);lastTask=lastTask.timedAfter('TraceImport',function buildEventIndices(){progressMeter.update('Building event indices...');this.model_.buildEventIndices();},this);lastTask=lastTask.timedAfter('TraceImport',function buildUserModel(){progressMeter.update('Building UserModel...');var userModelBuilder=new tr.importer.UserModelBuilder(this.model_);userModelBuilder.buildUserModel();},this);lastTask=lastTask.timedAfter('TraceImport',function sortExpectations(){progressMeter.update('Sorting user expectations...');this.model_.userModel.sortExpectations();},this);lastTask=lastTask.timedAfter('TraceImport',function runAudits(){progressMeter.update('Running auditors...');auditors.forEach(function(auditor){auditor.runAudit();});},this);lastTask=lastTask.timedAfter('TraceImport',function sortAlerts(){progressMeter.update('Updating alerts...');this.model_.sortAlerts();},this);lastTask=lastTask.timedAfter('TraceImport',function lastUpdateBounds(){progressMeter.update('Update bounds...');this.model_.updateBounds();},this);lastTask=lastTask.timedAfter('TraceImport',function addModelWarnings(){progressMeter.update('Looking for warnings...');if(!this.model_.isTimeHighResolution){this.model_.importWarning({type:'low_resolution_timer',message:'Trace time is low resolution, trace may be unusable.',showToUser:true});}},this);lastTask.after(function(){this.importing_=false;},this);return importTask;},createImporter_:function(eventData){var importerConstructor=tr.importer.Importer.findImporterFor(eventData);if(!importerConstructor){throw new Error('Couldn\'t create an importer for the provided '+'eventData.');}
lastTask=lastTask.timedAfter('TraceImport',function runMergeKernelWithuserland(){progressMeter.update('Merging kernel with userland...');this.model_.mergeKernelWithUserland();},this);var auditors=[];lastTask=lastTask.timedAfter('TraceImport',function createAuditorsAndRunAnnotate(){progressMeter.update('Adding arbitrary data to model...');auditors=this.importOptions_.auditorConstructors.map(function(auditorConstructor){return new auditorConstructor(this.model_);},this);auditors.forEach(function(auditor){auditor.runAnnotate();auditor.installUserFriendlyCategoryDriverIfNeeded();});},this);lastTask=lastTask.timedAfter('TraceImport',function computeWorldBounds(){progressMeter.update('Computing final world bounds...');this.model_.computeWorldBounds(this.importOptions_.shiftWorldToZero);},this);lastTask=lastTask.timedAfter('TraceImport',function buildFlowEventIntervalTree(){progressMeter.update('Building flow event map...');this.model_.buildFlowEventIntervalTree();},this);lastTask=lastTask.timedAfter('TraceImport',function joinRefs(){progressMeter.update('Joining object refs...');this.model_.joinRefs();},this);lastTask=lastTask.timedAfter('TraceImport',function cleanupUndeletedObjects(){progressMeter.update('Cleaning up undeleted objects...');this.model_.cleanupUndeletedObjects();},this);lastTask=lastTask.timedAfter('TraceImport',function sortMemoryDumps(){progressMeter.update('Sorting memory dumps...');this.model_.sortMemoryDumps();},this);lastTask=lastTask.timedAfter('TraceImport',function finalizeMemoryGraphs(){progressMeter.update('Finalizing memory dump graphs...');this.model_.finalizeMemoryGraphs();},this);lastTask=lastTask.timedAfter('TraceImport',function initializeObjects(){progressMeter.update('Initializing objects (step 2/2)...');this.model_.initializeObjects();},this);lastTask=lastTask.timedAfter('TraceImport',function buildEventIndices(){progressMeter.update('Building event indices...');this.model_.buildEventIndices();},this);lastTask=lastTask.timedAfter('TraceImport',function buildUserModel(){progressMeter.update('Building UserModel...');var userModelBuilder=new tr.importer.UserModelBuilder(this.model_);userModelBuilder.buildUserModel();},this);lastTask=lastTask.timedAfter('TraceImport',function sortExpectations(){progressMeter.update('Sorting user expectations...');this.model_.userModel.sortExpectations();},this);lastTask=lastTask.timedAfter('TraceImport',function runAudits(){progressMeter.update('Running auditors...');auditors.forEach(function(auditor){auditor.runAudit();});},this);lastTask=lastTask.timedAfter('TraceImport',function sortAlerts(){progressMeter.update('Updating alerts...');this.model_.sortAlerts();},this);lastTask=lastTask.timedAfter('TraceImport',function lastUpdateBounds(){progressMeter.update('Update bounds...');this.model_.updateBounds();},this);lastTask=lastTask.timedAfter('TraceImport',function addModelWarnings(){progressMeter.update('Looking for warnings...');if(!this.model_.isTimeHighResolution){this.model_.importWarning({type:'low_resolution_timer',message:'Trace time is low resolution, trace may be unusable.',showToUser:false});}},this);lastTask.after(function(){this.importing_=false;},this);return importTask;},createImporter_:function(eventData){var importerConstructor=tr.importer.Importer.findImporterFor(eventData);if(!importerConstructor){throw new Error('Couldn\'t create an importer for the provided '+'eventData.');}
return new importerConstructor(this.model_,eventData);},hasEventDataDecoder_:function(importers){for(var i=0;i<importers.length;++i){if(!importers[i].isTraceDataContainer())
return true;}
return false;}};return{ImportOptions:ImportOptions,Import:Import};});'use strict';tr.exportTo('tr.e.cc',function(){function PictureAsImageData(picture,errorOrImageData){this.picture_=picture;if(errorOrImageData instanceof ImageData){this.error_=undefined;this.imageData_=errorOrImageData;}else{this.error_=errorOrImageData;this.imageData_=undefined;}};PictureAsImageData.Pending=function(picture){return new PictureAsImageData(picture,undefined);};PictureAsImageData.prototype={get picture(){return this.picture_;},get error(){return this.error_;},get imageData(){return this.imageData_;},isPending:function(){return this.error_===undefined&&this.imageData_===undefined;},asCanvas:function(){if(!this.imageData_)
View
@@ -425,7 +425,7 @@ func (w *Walker) Import(name string) (*types.Package, error) {
w.imported[name] = &importing
root := w.root
if strings.HasPrefix(name, "golang.org/x/") {
if strings.HasPrefix(name, "golang_org/x/") {
root = filepath.Join(root, "vendor")
}
@@ -153,10 +153,13 @@ func (s *state) locatePotentialPhiFunctions(fn *Node) *sparseDefState {
p := e.Block()
dm.Use(t, p) // always count phi pred as "use"; no-op except for loop edges, which matter.
x := t.stm.Find(p, ssa.AdjustAfter, helper) // Look for defs reaching or within predecessors.
if x == nil { // nil def from a predecessor means a backedge that will be visited soon.
continue
}
if defseen == nil {
defseen = x
}
if defseen != x || x == nil { // TODO: too conservative at loops, does better if x == nil -> continue
if defseen != x {
// Need to insert a phi function here because predecessors's definitions differ.
change = true
// Phi insertion is at AdjustBefore, visible with find in same block at AdjustWithin or AdjustAfter.
@@ -270,6 +270,7 @@ var passes = [...]pass{
{name: "checkLower", fn: checkLower, required: true},
{name: "late phielim", fn: phielim},
{name: "late copyelim", fn: copyelim},
{name: "phi tighten", fn: phiTighten},
{name: "late deadcode", fn: deadcode},
{name: "critical", fn: critical, required: true}, // remove critical edges
{name: "likelyadjust", fn: likelyadjust},
Oops, something went wrong.

Showing you all comments on commits in this comparison.

@AlekSi

This comment has been minimized.

Show comment
Hide comment
@AlekSi

AlekSi Jul 29, 2016

Contributor

Why? Was there some discussion or proposal?

Contributor

AlekSi commented on 883e128 Jul 29, 2016

Why? Was there some discussion or proposal?

@bradfitz

This comment has been minimized.

Show comment
Hide comment
@bradfitz

bradfitz Jul 29, 2016

Member

We use github issues and gerrit code reviews for discussion, not github comments on commits. Our github code is only a mirror.

Member

bradfitz commented on 883e128 Jul 29, 2016

We use github issues and gerrit code reviews for discussion, not github comments on commits. Our github code is only a mirror.