Source File
protomem.go
Belonging Package
runtime/pprof
package pprof
import (
)
func ( io.Writer, []runtime.MemProfileRecord, int64, string) error {
:= newProfileBuilder()
.pbValueType(tagProfile_PeriodType, "space", "bytes")
.pb.int64Opt(tagProfile_Period, )
.pbValueType(tagProfile_SampleType, "alloc_objects", "count")
.pbValueType(tagProfile_SampleType, "alloc_space", "bytes")
.pbValueType(tagProfile_SampleType, "inuse_objects", "count")
.pbValueType(tagProfile_SampleType, "inuse_space", "bytes")
if != "" {
.pb.int64Opt(tagProfile_DefaultSampleType, .stringIndex())
}
:= []int64{0, 0, 0, 0}
var []uint64
for , := range {
:= true
for := 0; < 2; ++ {
= [:]
break
}
}
= .appendLocsForStack([:0], )
if len() > 0 {
break
}
= false // try again, and show all frames next time.
}
[0], [1] = scaleHeapSample(.AllocObjects, .AllocBytes, )
[2], [3] = scaleHeapSample(.InUseObjects(), .InUseBytes(), )
var int64
if .AllocObjects > 0 {
= .AllocBytes / .AllocObjects
}
.pbSample(, , func() {
if != 0 {
.pbLabel(tagSample_Label, "bytes", "", )
}
})
}
.build()
return nil
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |