X7ROOT File Manager
Current Path:
/opt/golang/1.17.2/src/runtime/pprof
opt
/
golang
/
1.17.2
/
src
/
runtime
/
pprof
/
📁
..
📄
elf.go
(2.79 KB)
📄
label.go
(2.95 KB)
📄
label_test.go
(3.21 KB)
📄
map.go
(1.94 KB)
📄
mprof_test.go
(5.8 KB)
📄
pprof.go
(28.04 KB)
📄
pprof_norusage.go
(334 B)
📄
pprof_rusage.go
(654 B)
📄
pprof_test.go
(40.84 KB)
📄
proto.go
(22.63 KB)
📄
proto_test.go
(16.22 KB)
📄
protobuf.go
(2.51 KB)
📄
protomem.go
(2.91 KB)
📄
protomem_test.go
(2.53 KB)
📄
runtime.go
(1.5 KB)
📄
runtime_test.go
(3 KB)
📁
testdata
Editing: pprof_rusage.go
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build darwin || linux // +build darwin linux package pprof import ( "fmt" "io" "runtime" "syscall" ) // Adds MaxRSS to platforms that are supported. func addMaxRSS(w io.Writer) { var rssToBytes uintptr switch runtime.GOOS { case "linux", "android": rssToBytes = 1024 case "darwin", "ios": rssToBytes = 1 default: panic("unsupported OS") } var rusage syscall.Rusage syscall.Getrusage(0, &rusage) fmt.Fprintf(w, "# MaxRSS = %d\n", uintptr(rusage.Maxrss)*rssToBytes) }
Upload File
Create Folder