profile

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFuncNotFound = fmt.Errorf("function not found")

Functions

Types

type CallTree

type CallTree struct {
	// contains filtered or unexported fields
}

func (*CallTree) IngestStack

func (c *CallTree) IngestStack(stack []uint64, symzer *Symbolizer)

type CallTreeNode

type CallTreeNode struct {
	Value    uint64
	Symbol   *FuncSymbol
	Count    uint64
	Children map[uint64]*CallTreeNode
}

type FuncSymbol

type FuncSymbol struct {
	Name   string
	Lo, Hi uint64

	File      string
	StartLine int
}

func (*FuncSymbol) Contains

func (f *FuncSymbol) Contains(pc uint64) bool

type Profiler

type Profiler struct {
	// contains filtered or unexported fields
}

func NewProfiler

func NewProfiler(pid int, symzer *Symbolizer) (*Profiler, error)

func (*Profiler) CallTree

func (p *Profiler) CallTree() *CallTree

func (*Profiler) Stacks

func (p *Profiler) Stacks() ([]Stack, error)

func (*Profiler) Start

func (p *Profiler) Start(ctx context.Context) error

func (*Profiler) Stop

func (p *Profiler) Stop() error

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

func (*Stack) User

func (s *Stack) User() []uint64

type Symbol

type Symbol struct {
	Function string
	FuncAddr uint64
	File     string
	Line     int
}

type Symbolizer

type Symbolizer struct {
	// contains filtered or unexported fields
}

func NewSymbolizer

func NewSymbolizer(path string) (*Symbolizer, error)

func (*Symbolizer) ResolveFunc

func (s *Symbolizer) ResolveFunc(pc uint64) (*FuncSymbol, error)

func (*Symbolizer) Symbolize

func (s *Symbolizer) Symbolize(addr uint64) (*Symbol, error)

Jump to

Keyboard shortcuts

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