Documentation ¶
Index ¶
- Constants
- func LoadUfuncgraph() (*ebpf.CollectionSpec, error)
- func LoadUfuncgraphObjects(obj interface{}, opts *ebpf.CollectionOptions) error
- type BPF
- type UfuncgraphEvent
- type UfuncgraphMapSpecs
- type UfuncgraphMaps
- type UfuncgraphObjects
- type UfuncgraphProgramSpecs
- type UfuncgraphPrograms
- type UfuncgraphSpecs
Constants ¶
const ( BpfInsertIndex = 81 EventDataOffset int64 = 436 VacantR10Offset = -96 )
Variables ¶
This section is empty.
Functions ¶
func LoadUfuncgraph ¶
func LoadUfuncgraph() (*ebpf.CollectionSpec, error)
LoadUfuncgraph returns the embedded CollectionSpec for Ufuncgraph.
func LoadUfuncgraphObjects ¶
func LoadUfuncgraphObjects(obj interface{}, opts *ebpf.CollectionOptions) error
LoadUfuncgraphObjects loads Ufuncgraph and converts it into a struct.
The following types are suitable as obj argument:
*UfuncgraphObjects *UfuncgraphPrograms *UfuncgraphMaps
See ebpf.CollectionSpec.LoadAndAssign documentation for details.
Types ¶
type BPF ¶
type BPF struct {
// contains filtered or unexported fields
}
func (*BPF) PollEvents ¶
func (b *BPF) PollEvents(ctx context.Context) chan UfuncgraphEvent
type UfuncgraphEvent ¶
type UfuncgraphMapSpecs ¶
type UfuncgraphMapSpecs struct { BpfStack *ebpf.MapSpec `ebpf:"bpf_stack"` EventQueue *ebpf.MapSpec `ebpf:"event_queue"` Goids *ebpf.MapSpec `ebpf:"goids"` }
UfuncgraphMapSpecs contains maps before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type UfuncgraphMaps ¶
type UfuncgraphMaps struct { BpfStack *ebpf.Map `ebpf:"bpf_stack"` EventQueue *ebpf.Map `ebpf:"event_queue"` Goids *ebpf.Map `ebpf:"goids"` }
UfuncgraphMaps contains all maps after they have been loaded into the kernel.
It can be passed to LoadUfuncgraphObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*UfuncgraphMaps) Close ¶
func (m *UfuncgraphMaps) Close() error
type UfuncgraphObjects ¶
type UfuncgraphObjects struct { UfuncgraphPrograms UfuncgraphMaps }
UfuncgraphObjects contains all objects after they have been loaded into the kernel.
It can be passed to LoadUfuncgraphObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*UfuncgraphObjects) Close ¶
func (o *UfuncgraphObjects) Close() error
type UfuncgraphProgramSpecs ¶
type UfuncgraphProgramSpecs struct { Entpoint *ebpf.ProgramSpec `ebpf:"entpoint"` EntpointWithBt *ebpf.ProgramSpec `ebpf:"entpoint_with_bt"` Retpoint *ebpf.ProgramSpec `ebpf:"retpoint"` }
UfuncgraphSpecs contains programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.
type UfuncgraphPrograms ¶
type UfuncgraphPrograms struct { Entpoint *ebpf.Program `ebpf:"entpoint"` EntpointWithBt *ebpf.Program `ebpf:"entpoint_with_bt"` Retpoint *ebpf.Program `ebpf:"retpoint"` }
UfuncgraphPrograms contains all programs after they have been loaded into the kernel.
It can be passed to LoadUfuncgraphObjects or ebpf.CollectionSpec.LoadAndAssign.
func (*UfuncgraphPrograms) Close ¶
func (p *UfuncgraphPrograms) Close() error
type UfuncgraphSpecs ¶
type UfuncgraphSpecs struct { UfuncgraphProgramSpecs UfuncgraphMapSpecs }
UfuncgraphSpecs contains maps and programs before they are loaded into the kernel.
It can be passed ebpf.CollectionSpec.Assign.