Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\fgraph.c Create Date:2022-07-28 12:17:58
Last Modify:2020-03-17 20:08:56 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Allocate a return stack for each task

Proto:static int start_graph_tracing(void)

Type:int

Parameter:Nothing

570  ret_stack_list = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
574  If Not ret_stack_list Then Return -ENOMEM
578  for_each_online_cpu(cpu)
579  If Not ret_stack Then Allocate a return stack for the idle task. May be the first* time through, or it may be done by CPU hotplug online.
583  Do
584  ret = Try to assign a return stack array on FTRACE_RETSTACK_ALLOC_SIZE tasks.
585  When ret == -EAGAIN cycle
587  If Not ret Then
588  ret = Tracepoint for task switches, performed by the scheduler:
589  If ret Then pr_info("ftrace_graph: Couldn't activate tracepoint probe to kernel_sched_switch\n")
594  kfree(ret_stack_list)
595  Return ret
Caller
NameDescribe
register_ftrace_graph