函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-27 14:54:06
Last Modify:2022-05-20 07:50:19 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Used to free events which have a known refcount of 1, such as in error paths* where the event isn't exposed yet and inherited events.

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

返回类型:void

参数:

类型参数名称
struct perf_event *event
4644  如果WARN(atomic_long_cmpxchg( & refcount, 1, 0) != 1, "unexpected event refcount: %ld; ptr=%p\n", atomic_long_read( & refcount), event)则
4648  返回
4651  _free_event(event)
调用者
名称描述
perf_event_release_kernelKill an event dead; while event:refcount will preserve the event* object, it will not preserve its functionality. Once the last 'user'* gives up the object, we'll destroy the thing.
perf_event_create_kernel_counterperf_event_create_kernel_counter*@attr: attributes of the counter to create*@cpu: cpu in which the counter is bound*@task: task to profile (NULL for percpu)
perf_event_exit_event
perf_free_event
inherit_eventInherit an event from parent task to child task.* Returns:* - valid pointer on success* - NULL for orphaned events* - IS_ERR() on error