函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:put_ctx

函数原型:static void put_ctx(struct perf_event_context *ctx)

返回类型:void

参数:

类型参数名称
struct perf_event_context *ctx
1190  如果_dec_and_test - decrement a refcount and test if it is 0*@r: the refcount* Similar to atomic_dec_and_test(), it will WARN on underflow and fail to* decrement when saturated at REFCOUNT_SATURATED
1191  如果These fields let us detect when two contexts have both* been cloned (inherited) from a common ancestor.put_ctx(These fields let us detect when two contexts have both* been cloned (inherited) from a common ancestor.)
1193  如果tasktask不等于TASK_TOMBSTONEput_task_struct(task)
1195  all_rcu() - Queue an RCU callback for invocation after a grace period
调用者
名称描述
put_ctx
perf_event_ctx_lock_nestedBecause of perf_event::ctx migration in sys_perf_event_open::move_group and* perf_pmu_migrate_context() we need some magic.* Those places that change perf_event::ctx will hold both* perf_event_ctx::mutex of the 'old' and 'new' ctx value.
perf_event_ctx_unlock
perf_event_enable_on_execEnable all of a task's events that have been marked enable-on-exec.* This expects task == current.
find_get_contextReturns a matching context with refcount and pincount.
_free_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_ctx_lock_doubleVariation on perf_event_ctx_lock_nested(), except we take two context* mutexes.
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_pmu_migrate_context
perf_event_exit_task_context
perf_event_free_taskFree a context as created by inheritance by perf_event_init_task() below,* used by fork() in case of fail.* Even though the task has never lived, the context and events have been* exposed through the child_list, so we must take care tearing it all down.
perf_event_init_contextInitialize the perf_event context in task_struct