Function report |
Source Code:kernel\bpf\stackmap.c |
Create Date:2022-07-28 13:26:52 |
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_stack
Proto:static inline __attribute__((__always_inline__)) u64 ____bpf_get_stack(struct pt_regs *regs, void *buf, u32 size, u64 flags)
Type:u64
Parameter:
Type | Parameter | Name |
---|---|---|
struct pt_regs * | regs | |
void * | buf | |
u32 | size | |
u64 | flags |
452 | user = flags & BPF_F_USER_STACK |
461 | If kernel && user_build_id Then Go to clear |
464 | elem_size = If user && user_build_id Then sizeof(structbpf_stack_build_id) Else sizeof(u64) |
466 | If Value for the false possibility is greater at compile time(size % elem_size) Then Go to clear |
470 | If sysctl_perf_event_max_stack < num_elem Then init_nr = 0 |
472 | Else init_nr = sysctl_perf_event_max_stack - num_elem |
476 | If Value for the false possibility is greater at compile time(!trace) Then Go to err_fault |
486 | ips = /proc/sys/kernel/perf_event_max_stack + skip + init_nr |
487 | If user && user_build_id Then stack_map_get_build_id_offset(buf, ips, trace_nr, user) |
489 | Else No 3D Now!(buf, ips, copy_len) |
494 | Return copy_len |
496 | err_fault : |
498 | clear : |
500 | Return err |
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 |