mirror of
https://github.com/golang/go
synced 2024-11-18 18:04:46 -07:00
608d57b3ae
As an optimization, the callers and callstack queries now avoid the relatively costly pointer analysis in some common cases: The callers of a function that is never address-taken can be enumerated directly from the SSA representation. Similarly, the callstack can be computed initially by ignoring dynamic call edges; we run the pointer analysis only if no path is found in this partial callgraph. As a bonus, this also causes the tool to preferentially report all-static callpaths. A callers query on fmt.Errorf now completes in 3 seconds instead of 8, and a callstack query completes in 2 seconds instead of 8. The new code is covered by the existing tests. Change-Id: I777ea07a1cdb6cadcc2a94952f553b6b036e7382 Reviewed-on: https://go-review.googlesource.com/19496 Reviewed-by: Michael Matloob <matloob@golang.org> |
||
---|---|---|
.. | ||
serial | ||
testdata/src | ||
callees.go | ||
callers.go | ||
callstack.go | ||
definition.go | ||
describe.go | ||
emacs-test.bash | ||
freevars.go | ||
guru_test.go | ||
guru.el | ||
guru.go | ||
guru.vim | ||
implements.go | ||
main.go | ||
peers.go | ||
pointsto.go | ||
pos.go | ||
referrers.go | ||
what.go | ||
whicherrs.go |