Commit 3824d3d
cmd/go: always track visited packages in setPGOProfilePath
Currently we only track visited (copied) packages when a copy is
required. When a copy is not required, we will rewalk each package's
entire dependency graph every time we see it, which is terribly
inefficient.
Pull the visited package check up a level so that we visit packages only
once regardless of how many times they are visited.
Fixes #60455.
Fixes #60428.
Change-Id: I4e9b31eeeaa170db650c461a5de2ca984b9aba0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/498735
Run-TryBot: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Auto-Submit: Michael Pratt <[email protected]>1 parent 6e248b8 commit 3824d3d
1 file changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2950 | 2950 | | |
2951 | 2951 | | |
2952 | 2952 | | |
2953 | | - | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
2954 | 2957 | | |
2955 | 2958 | | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
2956 | 2963 | | |
2957 | 2964 | | |
2958 | 2965 | | |
2959 | 2966 | | |
2960 | 2967 | | |
2961 | | - | |
2962 | | - | |
2963 | | - | |
2964 | 2968 | | |
2965 | 2969 | | |
2966 | 2970 | | |
| |||
2969 | 2973 | | |
2970 | 2974 | | |
2971 | 2975 | | |
2972 | | - | |
| 2976 | + | |
| 2977 | + | |
2973 | 2978 | | |
2974 | | - | |
| 2979 | + | |
| 2980 | + | |
2975 | 2981 | | |
2976 | 2982 | | |
2977 | 2983 | | |
| |||
0 commit comments