Function report | 
Source Code:kernel\bpf\stackmap.c | 
Create Date:2022-07-28 13:26:38 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:____bpf_get_stackid
Proto:static inline __attribute__((__always_inline__)) u64 ____bpf_get_stackid(struct pt_regs *regs, struct bpf_map *map, u64 flags)
Type:u64
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct pt_regs * | regs | |
| struct bpf_map * | map | |
| u64 | flags | 
| 352 | max_depth = value_size / stack_map_data_size(map) | 
| 357 | user = flags & BPF_F_USER_STACK | 
| 369 | If Value for the false possibility is greater at compile time(!trace) Then Return -EFAULT | 
| 384 | ips = /proc/sys/kernel/perf_event_max_stack + skip + init_nr | 
| 389 | hash_matches = bucket && hash == hash | 
| 391 | If hash_matches && flags & lags used by BPF_FUNC_get_stackid only. Then Return id | 
| 394 | If stack_map_use_build_id(map) Then | 
| 396 | new_bucket = pcpu_freelist_pop( & freelist) | 
| 398 | If Value for the false possibility is greater at compile time(!new_bucket) Then Return -ENOMEM | 
| 401 | stack_map_get_build_id_offset((structbpf_stack_build_id * )data, ips, trace_nr, user) | 
| 404 | trace_len = trace_nr * sizeof(structbpf_stack_build_id) | 
| 407 | pcpu_freelist_push( & freelist, & fnode) | 
| 408 | Return id | 
| 410 | If bucket && Not (flags & BPF_F_REUSE_STACKID) Then | 
| 411 | pcpu_freelist_push( & freelist, & fnode) | 
| 412 | Return -EEXIST | 
| 414 | Else | 
| 418 | If bucket && Not (flags & BPF_F_REUSE_STACKID) Then Return -EEXIST | 
| 421 | new_bucket = pcpu_freelist_pop( & freelist) | 
| 423 | If Value for the false possibility is greater at compile time(!new_bucket) Then Return -ENOMEM | 
| 425 | No 3D Now!(data, ips, trace_len) | 
| 431 | old_bucket = xchg( & buckets[id], new_bucket) | 
| 432 | If old_bucket Then pcpu_freelist_push( & freelist, & fnode) | 
| 434 | Return id | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |