]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: check Getrusage return value in addMaxRSS
authorTobias Klauser <tklauser@distanz.ch>
Thu, 18 Aug 2022 17:15:51 +0000 (19:15 +0200)
committerGopher Robot <gobot@golang.org>
Fri, 19 Aug 2022 20:04:40 +0000 (20:04 +0000)
commit2e06019dcd82c1c525c805af687063875d4b223b
treecb63779e41d29bc57ffe25165d62c186296c54d7
parent2cc6983a2103d64cd33a0fb67dc7ea2adcac3ba8
runtime/pprof: check Getrusage return value in addMaxRSS

Depending on the implementation of the getrusage syscall/function, the
value of rusage.Maxrss may be undefined in case of an error. Thus, only
report MaxRSS in case of no error.

Change-Id: I7572ccc53c49eb460e53bded3eb41736eed8d2ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/424815
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/pprof/pprof_rusage.go