Help us shape the future of Go! Take the 2026 Go Developer Survey

perf

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPerfMapNotFound = errors.New("perf-map not found")
	ErrEmptyPerfMap    = errors.New("perf-map is empty")
	ErrProcNotFound    = errors.New("process not found")
)
View Source
var ErrJITDumpNotFound = errors.New("jitdump not found")
View Source
var ErrNoSymbolFound = errors.New("no symbol found")

Functions

This section is empty.

Types

type JITDumpCache added in v0.28.0

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

func NewJITDumpCache added in v0.28.0

func NewJITDumpCache(
	logger log.Logger,
	reg prometheus.Registerer,
	tmpDir string,
	profilingDuration time.Duration,
) *JITDumpCache

func (*JITDumpCache) JITDumpForPID added in v0.28.0

func (p *JITDumpCache) JITDumpForPID(pid int, path string) (*symtab.FileReader, error)

DumpForPID reads the JIT dump for the given PID and filename and returns a Map that can be queried.

type Map added in v0.6.0

type Map struct {
	Path string
	// contains filtered or unexported fields
}

func ReadJITdump added in v0.28.0

func ReadJITdump(
	logger log.Logger,
	fileName string,
	w *symtab.FileWriter,
) (Map, error)

func ReadPerfMap added in v0.20.0

func ReadPerfMap(
	logger log.Logger,
	fileName string,
	w *symtab.FileWriter,
	prevAddrCount uint64,
) (*Map, error)

func (*Map) DeduplicatedIndices added in v0.28.0

func (p *Map) DeduplicatedIndices() *roaring.Bitmap

type MapAddr added in v0.6.0

type MapAddr struct {
	Start        uint64
	End          uint64
	SymbolOffset uint32
	SymbolLen    uint16
}

type PerfMapCache added in v0.20.0

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

func NewPerfMapCache added in v0.20.0

func NewPerfMapCache(logger log.Logger, reg prometheus.Registerer, nsCache *namespace.Cache, tmpDir string, profilingDuration time.Duration) *PerfMapCache

func (*PerfMapCache) PerfMapForPID added in v0.20.0

func (p *PerfMapCache) PerfMapForPID(pid int) (*symtab.FileReader, error)

MapForPID returns the Map for the given pid if it exists.

Jump to

Keyboard shortcuts

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