()
| 357 | } |
| 358 | |
| 359 | func (this *MStack) update_stack_config() { |
| 360 | if !this.mconf.StackUprobeConf.IsEnable() { |
| 361 | return |
| 362 | } |
| 363 | map_name := "uprobe_point_args" |
| 364 | bpf_map, err := this.FindMap(map_name) |
| 365 | if err != nil { |
| 366 | panic(fmt.Sprintf("find [%s] failed, err:%v", map_name, err)) |
| 367 | } |
| 368 | for _, uprobe_point := range this.mconf.StackUprobeConf.Points { |
| 369 | var filter_key uint32 = uprobe_point.Index |
| 370 | filter_value := uprobe_point.GetConfig() |
| 371 | err := bpf_map.Update(unsafe.Pointer(&filter_key), unsafe.Pointer(&filter_value), ebpf.UpdateAny) |
| 372 | if err != nil { |
| 373 | panic(fmt.Sprintf("update [%s] failed, filter_key:%d, err:%v", map_name, filter_key, err)) |
| 374 | } |
| 375 | } |
| 376 | if this.mconf.Debug { |
| 377 | this.logger.Printf("update %s success", map_name) |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | func (this *MStack) updateFilter() (err error) { |
| 382 | this.update_base_config() |
no test coverage detected