aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2021-12-06 16:05:55 -0500
committerMichael Pratt <mpratt@google.com>2021-12-07 22:33:33 +0000
commita3ae45ebe1b3576428f5eb27347704b2d099eab0 (patch)
tree7e3ce3a082c920164924b5a36ae34922e387fc55 /src/make.bash
parentcf1ec173603f950aaccb549602ed0fee57e6b709 (diff)
downloadgo-a3ae45ebe1b3576428f5eb27347704b2d099eab0.tar.xz
runtime/pprof: consume tag for first CPU record
profBuf.write uses an index in b.tags for each entry, even if that entry has no tag (that slice entry just remains 0). profBuf.read similarly returns a tags slice with exactly as many entries as there are records in data. profileBuilder.addCPUData iterates through the tags in lockstep with the data records. Except in the special case of the first record, where it forgets to increment tags. Thus the first read of profiling data has all tags off-by-one. To help avoid regressions, addCPUData is changed to assert that tags contains exactly the correct number of tags. For #50007. Change-Id: I5f32f93003297be8d6e33ad472c185d924a63256 Reviewed-on: https://go-review.googlesource.com/c/go/+/369741 Reviewed-by: Austin Clements <austin@google.com> Trust: Michael Pratt <mpratt@google.com> Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/make.bash')
0 files changed, 0 insertions, 0 deletions