go-perf: github.com/aclements/go-perf/perfsession Index | Files

package perfsession

import "github.com/aclements/go-perf/perfsession"

Package perfsession provides utilities for tracking session state while processing a perf.data profile.

The API of perfsession should be considered unstable at this point.


Package Files

package.go ranges.go session.go symbolize.go

func Symbolize Uses

func Symbolize(session *Session, mmap *Mmap, ip uint64, out *Symbolic) bool

type ExtraKey Uses

type ExtraKey *struct {
    private struct{}
    Name    string

func NewExtraKey Uses

func NewExtraKey(name string) ExtraKey

type Forkable Uses

type Forkable interface {
    Fork(pid int) Forkable

type ForkableExtra Uses

type ForkableExtra map[ExtraKey]Forkable

func (ForkableExtra) Fork Uses

func (f ForkableExtra) Fork(pid int) Forkable

type Mmap Uses

type Mmap struct {
    Extra ForkableExtra


type PIDInfo Uses

type PIDInfo struct {
    Extra ForkableExtra

    Comm string
    // contains filtered or unexported fields

func (*PIDInfo) LookupMmap Uses

func (p *PIDInfo) LookupMmap(addr uint64) *Mmap

type Ranges Uses

type Ranges struct {
    // contains filtered or unexported fields

Ranges stores data associated with ranges of uint64 values and supports efficient lookup.

func (*Ranges) Add Uses

func (r *Ranges) Add(lo, hi uint64, val interface{})

Add inserts val for range [lo, hi).

Add is undefined if [lo, hi) overlaps a range already in r.

func (*Ranges) Get Uses

func (r *Ranges) Get(idx uint64) (lo, hi uint64, val interface{}, ok bool)

Get returns the range and the value for the range containing idx.

type Session Uses

type Session struct {
    File  *perffile.File
    Extra map[ExtraKey]interface{}
    // contains filtered or unexported fields

func New Uses

func New(f *perffile.File) *Session

func (*Session) LookupPID Uses

func (s *Session) LookupPID(pid int) *PIDInfo

func (*Session) Update Uses

func (s *Session) Update(r perffile.Record)

type Symbolic Uses

type Symbolic struct {
    FuncName string
    Line     dwarf.LineEntry

Package perfsession imports 14 packages (graph) and is imported by 4 packages. Updated 2019-04-15. Refresh now. Tools for package owners.