MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / initDecodeFun

Method initDecodeFun

user/module/stack.go:392–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

390}
391
392func (this *MStack) initDecodeFun() error {
393 EventsMap, err := this.FindMap("events")
394 if err != nil {
395 return err
396 }
397 this.eventMaps = append(this.eventMaps, EventsMap)
398 // 根据设置添加 map 不然即使不使用的map也会创建缓冲区
399 uprobestackEvent := &event.UprobeEvent{}
400 this.eventFuncMaps[EventsMap] = uprobestackEvent
401 return nil
402}
403
404func (this *MStack) FindMap(map_name string) (*ebpf.Map, error) {
405 em, found, err := this.bpfManager.GetMap(map_name)

Callers 1

startMethod · 0.95

Calls 1

FindMapMethod · 0.95

Tested by

no test coverage detected