2022-07-22 17:39:18 +00:00
|
|
|
//go:build !linux || !amd64 || !go1.16
|
2021-07-31 15:16:26 +00:00
|
|
|
|
|
|
|
package ebpf
|
|
|
|
|
|
|
|
import (
|
2021-10-25 19:37:36 +00:00
|
|
|
"debug/elf"
|
2021-07-31 15:16:26 +00:00
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
type EBPFContext struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ctx *EBPFContext) Close() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ctx *EBPFContext) AttachUprobe(pid int, name string, offset uint32) error {
|
|
|
|
return errors.New("eBPF is disabled")
|
|
|
|
}
|
|
|
|
|
2021-10-25 19:37:36 +00:00
|
|
|
func (ctx *EBPFContext) AttachURetprobe(pid int, name string, offset uint32) error {
|
|
|
|
return errors.New("eBPF is disabled")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ctx *EBPFContext) UpdateArgMap(key uint64, goidOffset int64, args []UProbeArgMap, gAddrOffset uint64, isret bool) error {
|
2021-07-31 15:16:26 +00:00
|
|
|
return errors.New("eBPF is disabled")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ctx *EBPFContext) GetBufferedTracepoints() []RawUProbeParams {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func SymbolToOffset(file, symbol string) (uint32, error) {
|
|
|
|
return 0, errors.New("eBPF disabled")
|
|
|
|
}
|
|
|
|
|
2021-11-03 15:58:04 +00:00
|
|
|
func LoadEBPFTracingProgram(path string) (*EBPFContext, error) {
|
2021-07-31 15:16:26 +00:00
|
|
|
return nil, errors.New("eBPF disabled")
|
|
|
|
}
|
|
|
|
|
2021-10-25 19:37:36 +00:00
|
|
|
func AddressToOffset(f *elf.File, addr uint64) (uint32, error) {
|
|
|
|
return 0, errors.New("eBPF disabled")
|
2021-07-31 15:16:26 +00:00
|
|
|
}
|