Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:31:49
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:put_ctx

Proto:static void put_ctx(struct perf_event_context *ctx)

Type:void

Parameter:

TypeParameterName
struct perf_event_context *ctx
1190  If _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 Then
1191  If These fields let us detect when two contexts have both* been cloned (inherited) from a common ancestor. Then put_ctx(These fields let us detect when two contexts have both* been cloned (inherited) from a common ancestor.)
1193  If task && task != TASK_TOMBSTONE Then put_task_struct(task)
1195  all_rcu() - Queue an RCU callback for invocation after a grace period
Caller
NameDescribe
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