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:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bpf_event_output

Proto:u64 bpf_event_output(struct bpf_map *map, u64 flags, void *meta, u64 meta_size, void *ctx, u64 ctx_size, bpf_ctx_copy_t ctx_copy)

Type:u64

Parameter:

TypeParameterName
struct bpf_map *map
u64flags
void *meta
u64meta_size
void *ctx
u64ctx_size
bpf_ctx_copy_tctx_copy
632  nest_level = this_cpu_inc_return(bpf_event_output_nest_level)
633  struct perf_raw_frag frag = {copy = ctx_copy, size = ctx_size, data = ctx, }
638  struct perf_raw_record raw = {frag = {{next = ctx_size ? & frag : NULL, }, size = meta_size, data = meta, }, }
651  If WARN_ON_ONCE(nest_level > ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(sds)) Then
652  ret = -EBUSY
653  Go to out
655  sd = this_cpu_ptr( & sds[nest_level - 1])
656  regs = this_cpu_ptr( & regs[nest_level - 1])
658  perf_fetch_caller_regs(regs)
659  perf_sample_data_init(sd, 0, 0)
660  raw = raw
662  ret = __bpf_perf_event_output(regs, map, flags, sd)
663  out :
664  this_cpu_dec(bpf_event_output_nest_level)
665  Return ret