ebpf

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressToOffset added in v1.7.3

func AddressToOffset(f *elf.File, addr uint64) (uint64, error)

Types

type EBPFContext

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

func LoadEBPFTracingProgram

func LoadEBPFTracingProgram(path string) (*EBPFContext, error)

func (*EBPFContext) AttachUprobe

func (ctx *EBPFContext) AttachUprobe(pid int, name string, offset uint64) error

func (*EBPFContext) Close

func (ctx *EBPFContext) Close()

func (*EBPFContext) GetBufferedTracepoints

func (ctx *EBPFContext) GetBufferedTracepoints() []RawUProbeParams

func (*EBPFContext) UpdateArgMap

func (ctx *EBPFContext) UpdateArgMap(key uint64, goidOffset int64, args []UProbeArgMap, gAddrOffset uint64, isret bool) error

type RawUProbeParam

type RawUProbeParam struct {
	Pieces     []op.Piece
	RealType   godwarf.Type
	DwarfType  godwarf.Type // Full DWARF type from uprobe setup (for pointer rewriting).
	Kind       reflect.Kind
	Len        int64
	Base       uint64
	Addr       uint64
	Name       string // Parameter name from DWARF.
	Data       []byte // Raw parameter value bytes.
	Unreadable error  // If set, the parameter could not be read.
}

type RawUProbeParams

type RawUProbeParams struct {
	FnAddr       int
	GoroutineID  int
	IsRet        bool
	InputParams  []*RawUProbeParam
	ReturnParams []*RawUProbeParam
}

type UProbeArgMap

type UProbeArgMap struct {
	Offset    int64        // Offset from the stackpointer.
	Size      int64        // Size in bytes.
	Kind      reflect.Kind // Kind of variable.
	Pieces    []int        // Pieces of the variables as stored in registers.
	InReg     bool         // True if this param is contained in a register.
	Ret       bool         // True if this param is a return value.
	DwarfType godwarf.Type // Full DWARF type for Go-side decoding.
	Name      string       // Parameter name from DWARF.
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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