(items []uint32, offset uint32)
| 213 | } |
| 214 | |
| 215 | func (this *MStack) update_common_list(items []uint32, offset uint32) { |
| 216 | map_name := "common_list" |
| 217 | bpf_map, err := this.FindMap(map_name) |
| 218 | if err != nil { |
| 219 | panic(fmt.Sprintf("find [%s] failed, err:%v", map_name, err)) |
| 220 | } |
| 221 | for _, v := range items { |
| 222 | v += offset |
| 223 | err := bpf_map.Update(unsafe.Pointer(&v), unsafe.Pointer(&v), ebpf.UpdateAny) |
| 224 | if err != nil { |
| 225 | panic(fmt.Sprintf("update [%s] failed, err:%v", map_name, err)) |
| 226 | } |
| 227 | } |
| 228 | if this.mconf.Debug { |
| 229 | p, ok := util.START_OFFSETS[offset] |
| 230 | if !ok { |
| 231 | panic(fmt.Sprintf("offset%d invalid", offset)) |
| 232 | } |
| 233 | this.logger.Printf("update %s success, count:%d offset:%s", map_name, len(items), p) |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | func (this *MStack) list2string(items []uint32) string { |
| 238 | var results []string |
no test coverage detected