Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\bpf_trace.c Create Date:2022-07-28 12:36:06
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 inline __attribute__((__always_inline__)) u64 ____bpf_perf_event_output(struct pt_regs *regs, struct bpf_map *map, u64 flags, void *data, u64 size)

Type:u64

Parameter:

TypeParameterName
struct pt_regs *regs
struct bpf_map *map
u64flags
void *data
u64size
578  sds = this_cpu_ptr( & bpf_trace_sds)
579  nest_level = this_cpu_inc_return(bpf_trace_nest_level)
580  struct perf_raw_record raw = {frag = {size = size, data = data, }, }
589  If WARN_ON_ONCE(nest_level > ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(sds)) Then
590  err = -EBUSY
591  Go to out
594  sd = sds[nest_level - 1]
596  If Value for the false possibility is greater at compile time(flags & ~(BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and* BPF_FUNC_perf_event_read_value flags.)) Then
597  err = -EINVAL
598  Go to out
601  perf_sample_data_init(sd, 0, 0)
602  raw = raw
604  err = __bpf_perf_event_output(regs, map, flags, sd)
606  out :
607  this_cpu_dec(bpf_trace_nest_level)
608  Return err
Caller
NameDescribe
____bpf_perf_event_output_tp
____bpf_perf_event_output_raw_tp