函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\callchain.c Create Date:2022-07-27 15:03:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:alloc_callchain_buffers

函数原型:static int alloc_callchain_buffers(void)

返回类型:int

参数:

81  size等于offsetof(structcallchain_cpus_entries, cpu_entries[CPU数量])
83  entries等于分配内存并置零
84  如果非entries则返回:负ENOMEM
87  size等于perf_callchain_entry__sizeof()乘Number of contexts where an event can trigger:* task, softirq, hardirq, nmi.
89  遍历可用CPU(cpu)
90  cpu_entries[cpu]等于kmalloc_node(size, GFP_KERNEL, cpu_to_node(cpu))
92  如果非cpu_entries[cpu]则转到:fail
96  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(callchain_cpus_entries, entries)
98  返回:0
100  fail :
101  遍历可用CPU(cpu)
102  kfree(cpu_entries[cpu])
103  kfree(entries)
105  返回:负ENOMEM
调用者
名称描述
get_callchain_buffers