File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/cmd/compile/internal/pgo Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ func (p *Profile) PrintWeightedCallGraphDOT(edgeThreshold float64) {
380
380
381
381
// Determine nodes of DOT.
382
382
nodes := make (map [string ]* ir.Func )
383
- for name , _ := range funcs {
383
+ for name := range funcs {
384
384
if n , ok := p .WeightedCG .IRNodes [name ]; ok {
385
385
for _ , e := range p .WeightedCG .OutEdges [n ] {
386
386
if _ , ok := nodes [ir .PkgFuncName (e .Src .AST )]; ! ok {
@@ -484,7 +484,7 @@ func (g *IRGraph) calculateWeight(parent *IRNode, cur *IRNode) int64 {
484
484
sum := int64 (0 )
485
485
pw := int64 (0 )
486
486
for _ , InEdge := range g .InEdges [cur ] {
487
- sum = sum + InEdge .Weight
487
+ sum += InEdge .Weight
488
488
if InEdge .Src == parent {
489
489
pw = InEdge .Weight
490
490
}
You can’t perform that action at this time.
0 commit comments