Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\bpf_trace.c Create Date:2022-07-28 12:35:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__bpf_perf_event_output

Proto:static __always_inline u64 __bpf_perf_event_output(struct pt_regs *regs, struct bpf_map *map, u64 flags, struct perf_sample_data *sd)

Type:u64

Parameter:

TypeParameterName
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 = smp_processor_id()
541  index = flags & BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and* BPF_FUNC_perf_event_read_value flags.
545  If index == BPF_F_CURRENT_CPU Then index = cpu
547  If Value for the false possibility is greater at compile time(index >= max_entries) Then Return -E2BIG
550  ee = READ_ONCE(ptrs[index])
551  If Not ee Then Return -ENOENT
554  event = event
555  If Value for the false possibility is greater at compile time(type != PERF_TYPE_SOFTWARE || config != PERF_COUNT_SW_BPF_OUTPUT) Then Return -EINVAL
559  If Value for the false possibility is greater at compile time(oncpu != cpu) Then Return -EOPNOTSUPP
562  Return perf_event_output(event, sd, regs)
Caller
NameDescribe
____bpf_perf_event_output
bpf_event_output