函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:perf_event_detach_bpf_prog

函数原型:void perf_event_detach_bpf_prog(struct perf_event *event)

返回类型:void

参数:

类型参数名称
struct perf_event *event
1367  mutex_lock( & bpf_event_mutex)
1369  如果非prog则转到:unlock
1372  old_array等于bpf_event_rcu_dereference(prog_array)
1373  ret等于bpf_prog_array_copy(old_array, prog, NULL, & new_array)
1374  如果ret恒等于负ENOENT则转到:unlock
1376  如果ret小于0则
1377  bpf_prog_array_delete_safe(old_array, prog)
1378  否则
1379  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(prog_array, new_array)
1380  bpf_prog_array_free(old_array)
1383  bpf_prog_put(prog)
1384  prog = NULL
1386  unlock :
1387  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.