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

Method update_map

user/module/stack.go:193–205  ·  view source on GitHub ↗
(map_name string, filter_key uint32, filter_value interface{})

Source from the content-addressed store, hash-verified

191}
192
193func (this *MStack) update_map(map_name string, filter_key uint32, filter_value interface{}) {
194 bpf_map, err := this.FindMap(map_name)
195 if err != nil {
196 panic(fmt.Sprintf("find [%s] failed, err:%v", map_name, err))
197 }
198 err = bpf_map.Update(unsafe.Pointer(&filter_key), filter_value, ebpf.UpdateAny)
199 if err != nil {
200 panic(fmt.Sprintf("update [%s] failed, err:%v", map_name, err))
201 }
202 if this.mconf.Debug {
203 this.logger.Printf("update %s success", map_name)
204 }
205}
206
207func (this *MStack) update_base_config() {
208 // 更新 base_config 用作基础的过滤 比如排除 stackplz 自身相关的调用

Callers 3

update_base_configMethod · 0.95
update_common_filterMethod · 0.95
update_child_parentMethod · 0.95

Calls 1

FindMapMethod · 0.95

Tested by

no test coverage detected