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

Method update_common_list

user/module/syscall.go:196–216  ·  view source on GitHub ↗
(items []uint32, offset uint32)

Source from the content-addressed store, hash-verified

194}
195
196func (this *MSyscall) update_common_list(items []uint32, offset uint32) {
197 map_name := "common_list"
198 bpf_map, err := this.FindMap(map_name)
199 if err != nil {
200 panic(fmt.Sprintf("find [%s] failed, err:%v", map_name, err))
201 }
202 for _, v := range items {
203 v += offset
204 err := bpf_map.Update(unsafe.Pointer(&v), unsafe.Pointer(&v), ebpf.UpdateAny)
205 if err != nil {
206 panic(fmt.Sprintf("update [%s] failed, err:%v", map_name, err))
207 }
208 }
209 if this.mconf.Debug {
210 p, ok := util.START_OFFSETS[offset]
211 if !ok {
212 panic(fmt.Sprintf("offset%d invalid", offset))
213 }
214 this.logger.Printf("update %s success, count:%d offset:%s", map_name, len(items), p)
215 }
216}
217
218func (this *MSyscall) list2string(items []uint32) string {
219 var results []string

Callers 2

update_common_filterMethod · 0.95
updateFilterMethod · 0.95

Calls 1

FindMapMethod · 0.95

Tested by

no test coverage detected