heapfile

package
v0.0.0-...-776f117 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocProfile

type AllocProfile struct {
	ID          uint64
	Size        uint64
	StackFrames []Frame
	Allocs      uint64
	Frees       uint64
}

type AllocStackSample

type AllocStackSample struct {
	Address uint64
	ID      uint64
}

type Defer

type Defer struct {
	Address   uint64
	Goroutine uint64
	Argp      uint64
	PC        uint64
	FuncVal   uint64
	EntryPC   uint64
	NextDefer uint64
}

type DumpParams

type DumpParams struct {
	BigEndian       bool
	PointerSize     uint64
	HeapStartAddr   uint64
	HeapEndAddr     uint64
	Arch            string
	GoExperimentEnv string
	NCPU            uint64
}

type DumpReader

type DumpReader struct {
	OnObjectFn           func(record Object) error
	OnOtherRootFn        func(record OtherRoot) error
	OnTypeDescFn         func(record TypeDesc) error
	OnGoroutineFn        func(record Goroutine) error
	OnStackFrameFn       func(record StackFrame) error
	OnDumpParamsFn       func(record DumpParams) error
	OnFinalizerFn        func(record Finalizer) error
	OnItabFn             func(record Itab) error
	OnOSThreadFn         func(record OSThread) error
	OnMemStatsFn         func(record MemStats) error
	OnQueuedFinalizerFn  func(record Finalizer) error
	OnDataSegmentFn      func(record Segment) error
	OnBSSSegmentFn       func(record Segment) error
	OnDeferFn            func(record Defer) error
	OnPanicFn            func(record Panic) error
	OnAllocProfileFn     func(record AllocProfile) error
	OnAllocStackSampleFn func(record AllocStackSample) error
}

DumpReader is used to parse heap dump file. You can set handlers for each record type via On* fields.

If the field is not set, the record will be skipped.

func (DumpReader) Read

func (d DumpReader) Read(r Reader) error

Read parses heap dump. On every record it will invoke a certain On* function. The return error is either an error

	from parser itself or propagated from callback. Current version of heap dump supported is 1.7.
 Read https://github.com/golang/go/wiki/heapdump15-through-heapdump17 for the details.

type Finalizer

type Finalizer struct {
	Address     uint64
	FuncPointer uint64
	EntryPC     uint64
	ArgType     uint64
	ObjType     uint64
}

type Frame

type Frame struct {
	FuncName string
	FileName string
	Line     uint64
}

type Goroutine

type Goroutine struct {
	DescAddress      uint64
	StackTop         uint64
	ID               uint64
	GoStmtLocation   uint64
	Status           uint64
	IsSystem         bool
	IsBackground     bool
	WaitingSinceNano uint64
	WaitReason       string
	Frame            uint64
	OsThreadDesc     uint64
	TopDefer         uint64
	TopPanic         uint64
}

type Itab

type Itab struct {
	Address      uint64
	TypeDescAddr uint64
}

type MemStats

type MemStats struct {
	Alloc        uint64
	TotalAlloc   uint64
	Sys          uint64
	Lookups      uint64
	Mallocs      uint64
	Frees        uint64
	HeapAlloc    uint64
	HeapSys      uint64
	HeapIdle     uint64
	HeapInuse    uint64
	HeapReleased uint64
	HeapObjects  uint64
	StackInuse   uint64
	StackSys     uint64
	MSpanInuse   uint64
	MSpanSys     uint64
	MCacheInuse  uint64
	MCacheSys    uint64
	BuckHashSys  uint64
	GCSys        uint64
	OtherSys     uint64
	NextGC       uint64
	LastGC       uint64
	PauseTotalNs uint64
	PauseNs      [256]uint64
	NumGC        uint64
}

type OSThread

type OSThread struct {
	Address uint64
	ID      uint64
	OSID    uint64
}

type Object

type Object struct {
	Address        uint64
	Contents       []byte
	PointerOffsets []uint64
}

type OtherRoot

type OtherRoot struct {
	Description string
	Pointer     uint64
}

type Panic

type Panic struct {
	Address      uint64
	Goroutine    uint64
	Type         uint64
	Data         uint64
	DeferPointer uint64
	NextPanic    uint64
}

type Reader

type Reader interface {
	io.ByteReader
	io.Reader
}

type Segment

type Segment struct {
	Address        uint64
	Contents       []byte
	PointerOffsets []uint64
}

type StackFrame

type StackFrame struct {
	Address        uint64
	Depth          uint64
	ChildPointer   uint64
	Contents       []byte
	EntryPC        uint64
	CurrentPC      uint64
	ContinuationPC uint64
	FuncName       string
	PointerOffsets []uint64
}

type TypeDesc

type TypeDesc struct {
	Address   uint64
	Size      uint64
	Name      string
	IsPointer bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL