- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for MemProfileRecord (0.33 sec)
-
src/internal/profilerecord/profilerecord.go
package profilerecord type StackRecord struct { Stack []uintptr } type MemProfileRecord struct { AllocBytes, FreeBytes int64 AllocObjects, FreeObjects int64 Stack []uintptr } func (r *MemProfileRecord) InUseBytes() int64 { return r.AllocBytes - r.FreeBytes } func (r *MemProfileRecord) InUseObjects() int64 { return r.AllocObjects - r.FreeObjects } type BlockProfileRecord struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 14:38:45 UTC 2024 - 815 bytes - Viewed (0) -
test/heapsampling.go
// The loop should only execute one iteration in the common case. var p []runtime.MemProfileRecord n, ok := runtime.MemProfile(nil, true) for { // Allocate room for a slightly bigger profile, // in case a few more entries have been added // since the call to MemProfile. p = make([]runtime.MemProfileRecord, n+50) n, ok = runtime.MemProfile(p, true) if ok { p = p[0:n] break }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 27 21:36:06 UTC 2022 - 9.7K bytes - Viewed (0) -
test/finprofiled.go
for i := 0; i < 5; i++ { runtime.GC() time.Sleep(10 * time.Millisecond) } // Read memory profile. var prof []runtime.MemProfileRecord for { if n, ok := runtime.MemProfile(prof, false); ok { prof = prof[:n] break } else { prof = make([]runtime.MemProfileRecord, n+10) } } // See how much memory in tiny objects is profiled. var totalBytes int64 for _, p := range prof {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 16 05:48:00 UTC 2023 - 2.1K bytes - Viewed (0) -
src/runtime/pprof/protomem_test.go
addr1, addr2, map1, map2 := testPCs(t) // MemProfileRecord stacks are return PCs, so add one to the // addresses recorded in the "profile". The proto profile // locations are call PCs, so conversion will subtract one // from these and get back to addr1 and addr2. a1, a2 := uintptr(addr1)+1, uintptr(addr2)+1 rate := int64(512 * 1024) rec := []profilerecord.MemProfileRecord{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 14:38:45 UTC 2024 - 6.7K bytes - Viewed (0) -
src/runtime/pprof/protomem.go
import ( "internal/profilerecord" "io" "math" "runtime" "strings" ) // writeHeapProto writes the current heap profile in protobuf format to w. func writeHeapProto(w io.Writer, p []profilerecord.MemProfileRecord, rate int64, defaultSampleType string) error { b := newProfileBuilder(w) b.pbValueType(tagProfile_PeriodType, "space", "bytes") b.pb.int64Opt(tagProfile_Period, rate)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 14:38:45 UTC 2024 - 2.9K bytes - Viewed (0)