Versions in this module Expand all Collapse all v0 v0.10.0 Jul 21, 2017 Changes in this version + const BPF_F_NO_PREALLOC + const BPF_MAP_TYPE_HASH + const BPF_MAP_TYPE_LPM_TRIE + func OpenAfterMount(m *Map) error type Map + NonPersistent bool + func (m *Map) WithNonPersistent() *Map type MapInfo + OwnerProgType ProgType + type ProgType int + const ProgTypeCgroupSkb + const ProgTypeCgroupSock + const ProgTypeKprobe + const ProgTypeLwtIn + const ProgTypeLwtOut + const ProgTypeLwtXmit + const ProgTypePerfEvent + const ProgTypeSchedAct + const ProgTypeSchedCls + const ProgTypeSockOps + const ProgTypeSocketFilter + const ProgTypeTracepoint + const ProgTypeUnspec + const ProgTypeXdp + func (t ProgType) String() string v0.9.0 May 30, 2017 Changes in this version + func GetMtime() (uint64, error) + func ObjClose(fd int) error type Map + func (m *Map) GetNextKey(key MapKey, nextKey MapKey) error v0.9.0-rc1 May 24, 2017 v0.8.2 Apr 14, 2017 v0.8.1 Apr 6, 2017 v0.8.0 Mar 28, 2017 Changes in this version + const EventsMapName + const MAX_POLL_EVENTS + const PERF_COUNT_SW_BPF_OUTPUT + const PERF_SAMPLE_ADDR + const PERF_SAMPLE_BRANCH_STACK + const PERF_SAMPLE_CALLCHAIN + const PERF_SAMPLE_CPU + const PERF_SAMPLE_DATA_SRC + const PERF_SAMPLE_ID + const PERF_SAMPLE_IDENTIFIER + const PERF_SAMPLE_IP + const PERF_SAMPLE_PERIOD + const PERF_SAMPLE_RAW + const PERF_SAMPLE_READ + const PERF_SAMPLE_REGS_INTR + const PERF_SAMPLE_REGS_USER + const PERF_SAMPLE_STACK_USER + const PERF_SAMPLE_STREAM_ID + const PERF_SAMPLE_TID + const PERF_SAMPLE_TIME + const PERF_SAMPLE_TRANSACTION + const PERF_SAMPLE_WEIGHT + const PERF_TYPE_BREAKPOINT + const PERF_TYPE_HARDWARE + const PERF_TYPE_HW_CACHE + const PERF_TYPE_RAW + const PERF_TYPE_SOFTWARE + const PERF_TYPE_TRACEPOINT + func CreateMap(mapType int, keySize, valueSize, maxEntries uint32) (int, error) + func DeleteElement(fd int, key unsafe.Pointer) error + func GetMapPrefix() string + func GetMapRoot() string + func GetNextKey(fd int, key, nextKey unsafe.Pointer) error + func LookupElement(fd int, key, value unsafe.Pointer) error + func MapPath(name string) string + func MapPrefixPath() string + func MountFS() error + func ObjGet(pathname string) (int, error) + func ObjPin(fd int, pathname string) error + func OpenOrCreateMap(path string, mapType int, keySize, valueSize, maxEntries uint32) (int, bool, error) + func SetMapPrefix(path string) + func SetMapRoot(path string) + func UpdateElement(fd int, key, value unsafe.Pointer, flags uint64) error + type DumpCallback func(key MapKey, value MapValue) + type DumpParser func(key []byte, value []byte) (MapKey, MapValue, error) + type EPoll struct + func (ep *EPoll) AddFD(fd int, events uint32) error + func (ep *EPoll) Close() + func (ep *EPoll) Poll(timeout int) (int, error) + type EventMap struct + func (e *EventMap) Close() + func (e *EventMap) Update(ev *PerfEvent) error + type LostFunc func(msg *PerfEventLost, cpu int) + type Map struct + func NewMap(name string, mapType MapType, keySize int, valueSize int, maxEntries int) *Map + func OpenMap(name string) (*Map, error) + func (m *Map) Close() error + func (m *Map) DeepCopy() *Map + func (m *Map) Delete(key MapKey) error + func (m *Map) DeleteAll() error + func (m *Map) Dump(parser DumpParser, cb DumpCallback) error + func (m *Map) GetFd() int + func (m *Map) Lookup(key MapKey) (MapValue, error) + func (m *Map) Open() error + func (m *Map) OpenOrCreate() (bool, error) + func (m *Map) Update(key MapKey, value MapValue) error + type MapInfo struct + Flags uint32 + KeySize uint32 + MapType MapType + MaxEntries uint32 + ValueSize uint32 + func GetMapInfo(pid int, fd int) (*MapInfo, error) + type MapKey interface + GetKeyPtr func() unsafe.Pointer + NewValue func() MapValue + type MapType int + const MapTypeArray + const MapTypeArrayOfMaps + const MapTypeCgroupArray + const MapTypeHash + const MapTypeHashOfMaps + const MapTypeLPMTrie + const MapTypeLRUHash + const MapTypeLRUPerCPUHash + const MapTypePerCPUArray + const MapTypePerCPUHash + const MapTypePerfEventArray + const MapTypeProgArray + const MapTypeStackTrace + const MapTypeUnspec + func (t MapType) String() string + type MapValue interface + GetValuePtr func() unsafe.Pointer + type PerCpuEvents struct + Cpus int + Npages int + Pagesize int + func NewPerCpuEvents(config *PerfEventConfig) (*PerCpuEvents, error) + func (e *PerCpuEvents) CloseAll() error + func (e *PerCpuEvents) Poll(timeout int) (int, error) + func (e *PerCpuEvents) ReadAll(receive ReceiveFunc, lost LostFunc) error + func (e *PerCpuEvents) Stats() (uint64, uint64) + type PerfEvent struct + Fd int + func PerfEventOpen(config *PerfEventConfig, pid int, cpu int, groupFD int, flags int) (*PerfEvent, error) + func (e *PerfEvent) Close() + func (e *PerfEvent) Disable() error + func (e *PerfEvent) Enable() error + func (e *PerfEvent) Mmap(pagesize int, npages int) error + func (e *PerfEvent) Read(receive ReceiveFunc, lostFn LostFunc) error + type PerfEventConfig struct + Config int + MapName string + NumCpus int + NumPages int + SampleType int + Type int + WakeupEvents int + func DefaultPerfEventConfig() *PerfEventConfig + type PerfEventHeader struct + Misc uint16 + TotalSize uint16 + Type uint32 + type PerfEventLost struct + Id uint64 + Lost uint64 + type PerfEventSample struct + Size uint32 + func (e *PerfEventSample) DataCopy() []byte + func (e *PerfEventSample) DataDirect() []byte + type ReceiveFunc func(msg *PerfEventSample, cpu int)