Documentation ¶
Index ¶
- Constants
- type G
- type M
- type P
- type PSummary
- type Process
- func (p *Process) Attach() error
- func (p *Process) Detach() error
- func (p *Process) GetGs(lock bool) ([]*G, error)
- func (p *Process) GetPs(lock bool) ([]*P, error)
- func (p *Process) GetThread(id int) (t *Thread, ok bool)
- func (p *Process) GoVersion() (string, error)
- func (p *Process) Gomaxprocs() (int, error)
- func (p *Process) ReadData(data []byte, addr uint64) error
- func (p *Process) ReadVMA(addr uint64) (uint64, error)
- func (p *Process) SchedInfo() (*Sched, error)
- func (p *Process) Summary(lock bool) (*PSummary, error)
- type Sched
- type Thread
Constants ¶
View Source
const POINTER_SIZE = 8
amd64 pointer size
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type G ¶
type G struct { ID uint64 // goid Status gstatus // atomicstatus WaitReason gwaitReason // if Status ==Gwaiting M *M // hold worker thread info CurLoc *gbin.Location // runtime location UserLoc *gbin.Location // location of user code, a subset of CurLoc GoLoc *gbin.Location // location of `go` statement that spawed this goroutine StartLoc *gbin.Location // location of goroutine start function }
G is runtime.g struct parsed from process memory and binary dwarf
type PSummary ¶
type PSummary struct { BinPath string Gs []*G Ps []*P Sched *Sched ThreadsTotal int ThreadsSleeping int ThreadsStopped int ThreadsRunning int ThreadsZombie int GTotal int GIdle int GRunning int GSyscall int GWaiting int GoVersion string Gomaxprocs int }
PSummary holds process summary info
type Process ¶
type Process struct { ID int // contains filtered or unexported fields }
Process wrap operations on target process
func (*Process) Gomaxprocs ¶
type Sched ¶
type Sched struct { Nmidle int32 // number of idle m's waiting for work Nmspinning uint32 Nmfreed uint32 // cumulative number of freed m's Npidle int32 // number of idle p's Ngsys uint32 // number of system goroutines Runqsize int32 // global runnable queue size }
Sched is the global goroutine scheduler
Click to show internal directories.
Click to hide internal directories.