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

Function LoadMapPtr

asm/load_store.go:237–248  ·  view source on GitHub ↗

LoadMapPtr stores a pointer to a map in dst.

(dst Register, fd int)

Source from the content-addressed store, hash-verified

235
236// LoadMapPtr stores a pointer to a map in dst.
237func LoadMapPtr(dst Register, fd int) Instruction {
238 if fd < 0 {
239 return Instruction{OpCode: InvalidOpCode}
240 }
241
242 return Instruction{
243 OpCode: LoadImmOp(DWord),
244 Dst: dst,
245 Src: PseudoMapFD,
246 Constant: int64(uint32(fd)),
247 }
248}
249
250// LoadMapValue stores a pointer to the value at a certain offset of a map.
251func LoadMapValue(dst Register, fd int, offset uint32) Instruction {

Callers 13

newDistanceFilterFunction · 0.92
TestProgramInfoMapIDsFunction · 0.92
TestCollectionSpecCopyFunction · 0.92
collection_test.goFile · 0.92
TestProcessLinkFunction · 0.92
newUpdaterMapProgFunction · 0.92
outputSamplesProgFunction · 0.92
mainFunction · 0.92
mustOutputSamplesProgFunction · 0.92
mustOutputSamplesProgFunction · 0.92

Calls 1

LoadImmOpFunction · 0.85

Tested by 11

newDistanceFilterFunction · 0.74
TestProgramInfoMapIDsFunction · 0.74
TestCollectionSpecCopyFunction · 0.74
TestProcessLinkFunction · 0.74
newUpdaterMapProgFunction · 0.74
outputSamplesProgFunction · 0.74
mustOutputSamplesProgFunction · 0.74
mustOutputSamplesProgFunction · 0.74
TestMetadataCopyOnWriteFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…