| 115 | } |
| 116 | |
| 117 | func (this *PerfMMAP) initDecodeFun() error { |
| 118 | map_name := "fake_events" |
| 119 | FakeEventsMap, found, err := this.bpfManager.GetMap(map_name) |
| 120 | if err != nil { |
| 121 | return err |
| 122 | } |
| 123 | if !found { |
| 124 | return errors.New(fmt.Sprintf("cannot find map:%s", map_name)) |
| 125 | } |
| 126 | |
| 127 | this.eventMaps = append(this.eventMaps, FakeEventsMap) |
| 128 | commonEvent := &event.CommonEvent{} |
| 129 | commonEvent.SetConf(this.mconf) |
| 130 | this.eventFuncMaps[FakeEventsMap] = commonEvent |
| 131 | |
| 132 | return nil |
| 133 | } |
| 134 | |
| 135 | func (this *PerfMMAP) Events() []*ebpf.Map { |
| 136 | return this.eventMaps |