Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_bpf.c Create Date:2022-07-28 06:27:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__run_one

Proto:static int __run_one(const struct bpf_prog *fp, const void *data, int runs, u64 *duration)

Type:int

Parameter:

TypeParameterName
const struct bpf_prog *fp
const void *data
intruns
u64 *duration
6661  ret = 0
6663  Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
6664  start = ktime_get_ns()
6666  When i < runs cycle ret = BPF_PROG_RUN(fp, data)
6669  finish = ktime_get_ns()
6670  preempt_enable()
6672  duration = finish - start
6673  do_div() is NOT a C function( * duration, runs)
6675  Return ret
Caller
NameDescribe
run_one