mirror of
https://github.com/golang/go
synced 2024-11-23 18:10:04 -07:00
runtime/pprof: use syscall.RUSAGE_SELF
Change-Id: Idc37429de5a48e708eda868ca7fa26b28620bac0 Reviewed-on: https://go-review.googlesource.com/c/go/+/391854 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
842d37ee5f
commit
3c2e73c8c3
@ -28,6 +28,6 @@ func addMaxRSS(w io.Writer) {
|
||||
}
|
||||
|
||||
var rusage syscall.Rusage
|
||||
syscall.Getrusage(0, &rusage)
|
||||
syscall.Getrusage(syscall.RUSAGE_SELF, &rusage)
|
||||
fmt.Fprintf(w, "# MaxRSS = %d\n", uintptr(rusage.Maxrss)*rssToBytes)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user