()
| 390 | } |
| 391 | |
| 392 | func (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 | |
| 404 | func (this *MStack) FindMap(map_name string) (*ebpf.Map, error) { |
| 405 | em, found, err := this.bpfManager.GetMap(map_name) |