函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\stackmap.c Create Date:2022-07-27 14:45:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Called from syscall

函数原型:int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value)

返回类型:int

参数:

类型参数名称
struct bpf_map *map
void *key
void *value
522  smap等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(map, structbpf_stack_map, map)
524  id等于key
526  如果此条件成立可能性小(为编译器优化)(id >= n_buckets)则返回:负ENOENT
529  bucket等于xchg( & buckets[id], NULL)
530  如果非bucket则返回:负ENOENT
533  trace_len等于nrstack_map_data_size(map)
534  内存复制(value, data, trace_len)
535  memset(value + trace_len, 0, value_size - trace_len)
537  old_bucket等于xchg( & buckets[id], bucket)
538  如果old_bucketpcpu_freelist_push( & freelist, & fnode)
540  返回:0