(items []uint32, offset uint32)
| 194 | } |
| 195 | |
| 196 | func (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 | |
| 218 | func (this *MSyscall) list2string(items []uint32) string { |
| 219 | var results []string |
no test coverage detected