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

Method start

user/module/perf_mmap.go:87–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func (this *PerfMMAP) start() error {
88 err := this.setupManager()
89 if err != nil {
90 return err
91 }
92 this.setupManagerOptions()
93
94 var bpfFileName = filepath.Join("user/assets", this.hookBpfFile)
95 byteBuf, err := assets.Asset(bpfFileName)
96
97 if err != nil {
98 return fmt.Errorf("%s\tcouldn't find asset %v .", this.Name(), err)
99 }
100
101 if err = this.bpfManager.InitWithOptions(bytes.NewReader(byteBuf), this.bpfManagerOptions); err != nil {
102 return fmt.Errorf("couldn't init manager %v", err)
103 }
104
105 if err = this.bpfManager.Start(); err != nil {
106 return fmt.Errorf("couldn't start bootstrap manager %v .", err)
107 }
108
109 err = this.initDecodeFun()
110 if err != nil {
111 return err
112 }
113
114 return nil
115}
116
117func (this *PerfMMAP) initDecodeFun() error {
118 map_name := "fake_events"

Callers 1

StartMethod · 0.95

Calls 5

setupManagerMethod · 0.95
setupManagerOptionsMethod · 0.95
initDecodeFunMethod · 0.95
NameMethod · 0.65
StartMethod · 0.65

Tested by

no test coverage detected