1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:14:46 -07:00
Commit Graph

1278 Commits

Author SHA1 Message Date
Alan Donovan
c13d674f5e go/callgraph/rta: rename from go/rta
LGTM=sameer
R=sameer
CC=golang-codereviews, gri
https://golang.org/cl/175770043
2014-11-14 11:02:44 -05:00
Alan Donovan
50755a56a8 go/ssa: report memory consumption separated by phase in stdlib_test
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/170600043
2014-11-13 13:03:59 -05:00
Alan Donovan
b8d26f5b94 tools: minor comment fixes.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/173170043
2014-11-13 12:34:25 -05:00
Andrew Gerrand
c05aea77a9 x/tools/dashboard/app: use ?branch=foo to show foo branch commits
LGTM=rsc
R=bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/167660043
2014-11-13 21:53:13 +11:00
Robert Griesemer
c2b324b9b4 cmd/callgraph: fix build
TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/171640043
2014-11-12 16:49:47 -08:00
Robert Griesemer
932b62a02f go/types: add missing nil check in Info.TypeOf
Also use type assertions in a more defensive
way (check for != nil rather than ok).

LGTM=dsymonds, adonovan
R=adonovan, dsymonds
CC=golang-codereviews
https://golang.org/cl/169480043
2014-11-12 15:39:43 -08:00
Alan Donovan
b8a5fcfcec cmd/callgraph: a utility for dumping the callgraph of a Go program.
(This functionality is provided by the oracle, but its output
format is inflexible, and the functionality is better suited
to a shell utility.  I may remove the oracle 'callgraph' feature.)

See Usage for details.

+ Test.

LGTM=sameer
R=sameer
CC=golang-codereviews, gri
https://golang.org/cl/164460044
2014-11-12 17:36:22 -05:00
Alan Donovan
194c5aa350 go.tools/go/rta: implement Rapid Type Analysis for Go.
This is an algorithm for callgraph construction that is faster
but much less precise than pointer analysis.
(I evaluated this for the Go Oracle last year but shelved it,
but it's a natural fit for the work Brian is doing on
automatic program minimization.)

LGTM=sameer
R=gri, crawshaw, sameer
CC=bwkster, golang-codereviews
https://golang.org/cl/124690043
2014-11-12 17:34:15 -05:00
Dmitri Shuralyov
a26eca502f go.tools/imports: use same logic as 'go' tool for pruning package search.
The previous logic would descend into "_"-prefixed names, "testdata" folders,
and skipped folders beginning with a digit.

Fixes golang/go#8958.

LGTM=bradfitz
R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/167000043
2014-11-12 12:45:17 -08:00
Alan Donovan
c097262a24 cmd/digraph: support Go-style double-quotes in input data.
+ test.

LGTM=sameer
R=sameer
CC=golang-codereviews, gri
https://golang.org/cl/170090043
2014-11-12 13:37:06 -05:00
Alan Donovan
fb44a24d4c refactor/rename: fix crash when renaming anonymous struct field that's a qualified reference
(or a pointer, or both).

+ test

Fixes bug 8924

LGTM=sameer
R=dominik.honnef, sameer
CC=<dominik.honnef, golang-codereviews
https://golang.org/cl/158920043
2014-11-10 16:03:40 -05:00
Andrew Gerrand
ab43333964 x/tools/dashboard/app: respect gohash in Commit.AddResult
This should fix the issue where results sub-repo results are clobbered
by subsequent commits. (Much like the previous fix, which only
fixed the issue for main repo commits.)

TBR=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/167440044
2014-11-10 13:58:29 +11:00
Andrew Gerrand
8bd0dd9d19 x/tools/dashboard/coordinator: provide build key in / and /root
LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/170260044
2014-11-10 13:22:35 +11:00
Andrew Gerrand
df7f175a64 x/tools/dashboard/app: revert sub-repo path rename
We're going to keep the old paths in the dashboard until
after Go 1.4 is out the door.

TBR=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/169240044
2014-11-10 13:21:57 +11:00
Andrew Gerrand
42bbc3ebf0 x/tools/dashboard/app: prevent builders from nuking other results
This fixes the issue where a builder would occasionally wipe out
the results from another builder.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/172150043
2014-11-10 13:18:31 +11:00
Andrew Gerrand
3ee677ac1c go.tools/dashboard/env: use newer builder
This version of the builder can handle the new golang.org/x/ paths.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/174750043
2014-11-10 11:49:19 +11:00
Andrew Gerrand
bdb10cf821 go.tools/dashboard/builder: rewrite sub-repo paths before 'go get' and 'go test'
The dashboard still uses the old "code.google.com/p/go.*" import paths.
Rewrite them to the new "golang.org/x/*" before running 'go get' and 'go test'.

Update golang/go#9079.

LGTM=rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/174740043
2014-11-10 10:42:45 +11:00
Andrew Gerrand
5ebbcd132f go.tools: use golang.org/x/... import paths
Rewrite performed with this command:
  sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
    $(grep -lr 'code.google.com/p/go.' *)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
2014-11-10 08:50:40 +11:00
Alan Donovan
3191bbae17 go/buildutil: call ReadDir via the build.Context's file system interface
LGTM=gri
R=gri, crawshaw
CC=golang-codereviews
https://golang.org/cl/171920043
2014-11-05 12:34:34 -05:00
Andrew Gerrand
ef648ad89b go.tools/godoc/static: replace bake.sh with "go generate" rule
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/164490043
2014-11-05 16:52:40 +11:00
Austin Clements
348181cdd4 cmd/vet: tests for RET checking, SP checking, and leaf functions
Add tests for recently introduced asm error checks in vet.
This adds tests for the new warnings about functions that
don't store to their return slot before returning or that
store to SP-relative addresses in or beyond the argument
frame.  It also adds a test for leaf function handling on arm,
where the link register is not implicitly saved.

LGTM=rsc
R=rsc
CC=adg, golang-codereviews, r
https://golang.org/cl/166040044
2014-11-03 17:27:41 -05:00
Austin Clements
52f3c4bf8a cmd/vet: update test patterns to include asm function name
vet now includes function names in its error messages about
assembly code.  Update the error test patterns to account for
this and expand some patterns to check that go vet discovers
the function name correctly.

Fixes golang/go#9041

LGTM=r
R=adg, r, rsc
CC=golang-codereviews
https://golang.org/cl/170940044
2014-11-02 12:21:04 -05:00
Alan Donovan
d73c11bfcb refactor/rename: make -from syntax support string literals for complex import paths.
(They may contain any character, after all.)

Also, allow but don't require parens and stars.
e.g. (*"encoding/json".Decoder).Decode or "encoding/json".Decoder.Decode
     but not encoding/json.Decoder.Decode.

Since -from queries are now Go expressions, we use the Go parser.
(Thanks to Rog Peppe for the suggestion.)

LGTM=sameer
R=sameer
CC=golang-codereviews, gri, rogpeppe
https://golang.org/cl/154610043
2014-10-31 15:39:22 -04:00
Andrew Gerrand
cf285cde60 go.tools/dashboard/app: fix tests
TBR=dvyukov
R=dvyukov, bradfitz
CC=golang-codereviews
https://golang.org/cl/165740043
2014-10-31 09:04:03 +11:00
Andrew Gerrand
cce262cd47 go.tools/dashboard/app: remove redundant transaction
The code is already called from inside a transaction.

TBR=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/161580045
2014-10-31 09:03:27 +11:00
Andrew Gerrand
5d1cfb1968 go.tools/cmd/godoc: add handlers for new sub-repo paths
Fixes golang/go#9009.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/162470043
2014-10-31 09:01:52 +11:00
Austin Clements
c7512a5f83 cmd/vet: check return moves, support power64x, various fixes
This adds support for checking moves to the return value stack
slot (from rsc), adds support for checking power64x assembly,
fixes argument offset checking and leaf function support on
platforms with a link register (arm and power64).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/166920043
2014-10-30 11:53:56 -04:00
Alan Donovan
dcf508a4ed astutil: delete unused function RenameTop.
Fixes golang/go#9008
(in a manner of speaking)

LGTM=crawshaw
R=crawshaw
CC=bradfitz, golang-codereviews
https://golang.org/cl/165010043
2014-10-28 12:19:23 -04:00
Alex Brainman
4bb917e48d go.tools/cmd/godoc: wait for godoc to exit before removing tmp directory
otherwise tmp directories do not get deleted on windows

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/166750043
2014-10-28 16:59:58 +11:00
Alex Brainman
30f7e63100 go.tools/godoc: do not assume that all windows paths are delimited by os.PathSeparator (fixes build)
Fixes golang/go#9003.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/161420043
2014-10-28 12:26:29 +11:00
Alex Brainman
d8b266df1c go.tools/cmd/godoc: wait for analysis to complete in TestTypeAnalysis
LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/157590043
2014-10-28 12:25:46 +11:00
Andrew Gerrand
113eb67ee0 go.tools/dashboard/app: update commit in transaction on perf regression
The sendPerfFailMail function populated a dummy commit value and
then calls commonNotify, which then updated and stored that dummy
commit, hosing the original commit entity.

LGTM=rsc
R=rsc, bradfitz, dvyukov
CC=golang-codereviews
https://golang.org/cl/164960043
2014-10-28 11:25:09 +11:00
Alan Donovan
11451553df go/pointer: fix panic due to bogus constraint from value,ok receive operation.
See regression test for explanation.

I audited the code for similar issues and found none.

Many thanks to Daniel Morsing for providing a small
reproducible test case, a rarity for PTA bugs!

Fixes golang/go#9002

LGTM=crawshaw
R=crawshaw
CC=daniel.morsing, golang-codereviews
https://golang.org/cl/163350043
2014-10-27 13:55:52 -04:00
Aram Hăvărneanu
818b91e9f2 go.tools/dashboard: remove Solaris builders from flaky builders list
solaris-amd64-solaris11 has been the most stable builder,
by far, over the last 9 months. solaris-amd64-smartos is
stable too and it's our fastest builder.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=adg, dave, golang-codereviews
https://golang.org/cl/163280043
2014-10-27 17:31:13 +01:00
Dmitriy Vyukov
74dcdae16a dashboard: fix update script
It needs to remove perf results rather than build results.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/164000043
2014-10-27 13:07:50 +03:00
Dmitriy Vyukov
0b5a61fa3a dashboard: fix typo
LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/162180043
2014-10-27 13:07:31 +03:00
Andrew Gerrand
0d5881e51c go.tools/dashboard: don't notify on failures from flaky plan9 builder
LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://golang.org/cl/157580043
2014-10-27 20:56:27 +11:00
Dmitriy Vyukov
a7be953466 dashboard: always run bench binary with timeout
When the tree is particularly broken,
even the first invocation of bench binary that queries list
of benchmarks can hang.
Fixes golang/go#8844.

LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/162160043
2014-10-24 21:05:24 +04:00
Dmitriy Vyukov
e419b2a606 dashboard: extend builder logging
Current response logging logs either nil or pointer value
(e.g. "dash -> {0xc20802e058}"). Not very useful.
Log actual response data.

LGTM=bradfitz
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/163860043
2014-10-24 21:04:13 +04:00
Robert Griesemer
bdfcf50b6f cmd/vet: fix internal comments
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/163070043
2014-10-23 10:59:27 -07:00
Alan Donovan
e2e1830b02 godoc/analysis: remove obsolete comment.
The bug it refers to is now fixed, and the alternative
implementation it suggests is not an improvement.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/151620044
2014-10-23 13:42:24 -04:00
Robert Griesemer
ea1477608d cmd/vet: use changed types.LookupParent API (fix build)
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/162080043
2014-10-23 09:57:19 -07:00
Robert Griesemer
b10dfb99c5 go/types: don't mark external package objects as used
Also removes a potential race condition regarding the
used flag of Var objects when type-checking packages
concurrently.

Implementation: Rather than marking all used dot-imported
objects and then deduce which corresponding package was used,
now we consider all dot-imported packages as unused and remove
each package from the unused packages map as objects are used.

Now only objects that can be marked as used have a used field
(variables, labels, and packages).

As a result, the code became cleaner and simpler.

Fixes golang/go#8969.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/163740043
2014-10-23 09:39:20 -07:00
Andriy Lytvynov
b916c559e7 cmd/godoc: do not apply package path restrictions onto GOROOT when indexing.
Fixes golang/go#6925.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/156540043
2014-10-23 09:34:01 -07:00
Alan Donovan
5f5b110a59 cmd/digraph: digraph: a UNIX-style utility command for common operations on directed graphs in text format.
Example: show the transitive closure of imports of the digraph tool itself:

% go list -f '{{.ImportPath}}{{.Imports}}' ... | tr '[]' '  ' |
    digraph forward code.google.com/p/go.tools/cmd/digraph

+ basic test.

LGTM=gri
R=gri, sameer
CC=golang-codereviews
https://golang.org/cl/161760043
2014-10-23 09:13:39 -04:00
Alex Brainman
181e280a22 refactor/rename: use filepath.ToSlash everywhere to fix windows tests
Fixes golang/go#8823.

LGTM=adonovan
R=golang-codereviews, gobot, adonovan
CC=golang-codereviews
https://golang.org/cl/142660043
2014-10-23 09:45:47 +11:00
Dmitriy Vyukov
d183041bb0 dashboard: update update script to delete Commit.PerfResult
This is required to repair perf data in the datastore.
Update golang/go#8930.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/158320043
2014-10-22 17:44:46 +04:00
Andrew Gerrand
501f6851f9 go.tools/dashboard: silence notifications from netbsd-amd64-bsiegert
It is a flaky builder.

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/155620047
2014-10-22 11:54:29 +11:00
Luit van Drongelen
db0461cf4c dashboard: images should be fetched from HTTPS
Revision 184f9219148f (from review 152790043) introduced a new image,
linux-x86-clang, and the url is missing the `s` for TLS.

LGTM=adg
R=bradfitz, golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/156480043
2014-10-22 09:33:04 +11:00
Alan Donovan
7f1538dc8c refactor: don't litter the source tree with backup turdlets.
Also, restore from backup if the replacement file cannot be written.

LGTM=sameer
R=sameer
CC=golang-codereviews
https://golang.org/cl/155660043
2014-10-21 11:15:00 -04:00