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

Method initDecodeFun

user/module/brk.go:141–157  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139}
140
141func (this *PerfBRK) initDecodeFun() (err error) {
142 map_name := "brk_events"
143 BrkEventsMap, found, err := this.bpfManager.GetMap(map_name)
144 if err != nil {
145 return err
146 }
147 if !found {
148 return errors.New(fmt.Sprintf("cannot find map:%s", map_name))
149 }
150
151 this.eventMaps = append(this.eventMaps, BrkEventsMap)
152 brkEvent := &event.BrkEvent{}
153 brkEvent.SetConf(this.mconf)
154 this.eventFuncMaps[BrkEventsMap] = brkEvent
155
156 return nil
157}
158
159func (this *PerfBRK) Events() []*ebpf.Map {
160 return this.eventMaps

Callers 1

startMethod · 0.95

Calls 1

SetConfMethod · 0.65

Tested by

no test coverage detected