MCPcopy
hub / github.com/cilium/ebpf / ObjInfo

Function ObjInfo

internal/sys/syscall.go:119–128  ·  view source on GitHub ↗

ObjInfo retrieves information about a BPF Fd. info may be one of MapInfo, ProgInfo, LinkInfo, BtfInfo and TokenInfo.

(fd *FD, info Info)

Source from the content-addressed store, hash-verified

117//
118// info may be one of MapInfo, ProgInfo, LinkInfo, BtfInfo and TokenInfo.
119func ObjInfo(fd *FD, info Info) error {
120 ptr, len := info.info()
121 err := ObjGetInfoByFd(&ObjGetInfoByFdAttr{
122 BpfFd: fd.Uint(),
123 InfoLen: len,
124 Info: UnsafePointer(ptr),
125 })
126 runtime.KeepAlive(fd)
127 return err
128}
129
130// BPFObjName is a null-terminated string made up of
131// 'A-Za-z0-9_' characters.

Callers 15

TestMapNameFunction · 0.92
minimalMapInfoFromFdFunction · 0.92
newMapInfoFromFdFunction · 0.92
newProgramStatsFromFdFunction · 0.92
minimalProgramInfoFromFdFunction · 0.92
newProgramInfoFromFdFunction · 0.92
info.goFile · 0.92
TestProgramNameFunction · 0.92
SpecMethod · 0.92
newHandleInfoFromFDFunction · 0.92
InfoMethod · 0.92
queryInfoWithStringFunction · 0.92

Calls 4

ObjGetInfoByFdFunction · 0.85
UnsafePointerFunction · 0.85
UintMethod · 0.80
infoMethod · 0.65

Tested by 2

TestMapNameFunction · 0.74
TestProgramNameFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…