函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__bpf_perf_event_output

函数原型:static __always_inline u64 __bpf_perf_event_output(struct pt_regs *regs, struct bpf_map *map, u64 flags, struct perf_sample_data *sd)

返回类型:u64

参数:

类型参数名称
struct pt_regs *regs
struct bpf_map *map
u64flags
struct perf_sample_data *sd
539  array等于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_array, map)
540  cpu等于当前cpu ID()
541  index等于flags按位与BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and* BPF_FUNC_perf_event_read_value flags.
545  如果index恒等于BPF_F_CURRENT_CPUindex等于cpu
547  如果此条件成立可能性小(为编译器优化)(index >= max_entries)则返回:负E2BIG
550  ee等于READ_ONCE(ptrs[index])
551  如果非ee则返回:负ENOENT
554  event等于event
555  如果此条件成立可能性小(为编译器优化)(type != PERF_TYPE_SOFTWARE || config != PERF_COUNT_SW_BPF_OUTPUT)则返回:负EINVAL
559  如果此条件成立可能性小(为编译器优化)(oncpu != cpu)则返回:负EOPNOTSUPP
562  返回:perf_event_output(event, sd, regs)
调用者
名称描述
____bpf_perf_event_output
bpf_event_output