Function Report

Linux Kernel (v4.4)

Source File:kernel\events\core.c Create Date:2016-01-14 12:10:11
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:perf_event_free_task

Function:void perf_event_free_task(struct task_struct *task)

Return Type:void

Parameter:

Type Parameter NameRemarks
struct task_struct * task

Function description:Free an unexposed, unused context as created by inheritance by perf_event_init_task below, used by fork() in case of fail.

8934  for_each_task_context_nr
8935  ctx = perf_event_ctxp[ctxn]
8936  If !ctx then Continue.
8939  mutex_lock
8940  again
8943  iterate over list of given type safe against removal of list entryperf_free_event(event, ctx)
8947  iterate over list of given type safe against removal of list entryperf_free_event(event, ctx)
8950  If ! tests whether a list is empty || ! tests whether a list is empty then Go to again
8953  release the mutex
8955  put_ctx(ctx)
Caller
Function NameFunction description
copy_processCreate a new process
perf_event_init_taskInitialize the perf_event context in task_struct