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

Method start

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

Source from the content-addressed store, hash-verified

111}
112
113func (this *PerfBRK) start() error {
114 err := this.setupManager()
115 if err != nil {
116 return err
117 }
118 this.setupManagerOptions()
119
120 var bpfFileName = filepath.Join("user/assets", this.hookBpfFile)
121 byteBuf, err := assets.Asset(bpfFileName)
122
123 if err != nil {
124 return fmt.Errorf("%s\tcouldn't find asset %v .", this.Name(), err)
125 }
126
127 if err = this.bpfManager.InitWithOptions(bytes.NewReader(byteBuf), this.bpfManagerOptions); err != nil {
128 return fmt.Errorf("couldn't init manager %v", err)
129 }
130
131 if err = this.bpfManager.Start(); err != nil {
132 return fmt.Errorf("couldn't start bootstrap manager %v .", err)
133 }
134 err = this.initDecodeFun()
135 if err != nil {
136 return err
137 }
138 return nil
139}
140
141func (this *PerfBRK) initDecodeFun() (err error) {
142 map_name := "brk_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