]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: actually use tag parameter
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 7 Mar 2017 16:05:40 +0000 (16:05 +0000)
committerRuss Cox <rsc@golang.org>
Tue, 7 Mar 2017 20:01:05 +0000 (20:01 +0000)
It's only ever called with the value it was using, but the code was
counterintuitive. Use the parameter instead, like the other funcs near
it.

Found by github.com/mvdan/unparam.

Change-Id: I45855e11d749380b9b2a28e6dd1d5dedf119a19b
Reviewed-on: https://go-review.googlesource.com/37893
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/pprof/proto.go

index 2a5f572c64c7c3496c1fb85ff57a53959344a557..dd3d5c3b0b9efbecb84fa16cac3eca2ff8a00e77 100644 (file)
@@ -178,7 +178,7 @@ func (b *profileBuilder) pbMapping(tag int, id, base, limit, offset uint64, file
        b.pb.int64Opt(tagMapping_Filename, b.stringIndex(file))
        // TODO: Set any of HasInlineFrames, HasFunctions, HasFilenames, HasLineNumbers?
        // It seems like they should all be true, but they've never been set.
-       b.pb.endMessage(tagProfile_Mapping, start)
+       b.pb.endMessage(tag, start)
 }
 
 // locForPC returns the location ID for addr.