Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\callchain.c Create Date:2022-07-28 13:43:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:alloc_callchain_buffers

Proto:static int alloc_callchain_buffers(void)

Type:int

Parameter:Nothing

81  size = offsetof(structcallchain_cpus_entries, cpu_entries[Setup number of possible processor ids ])
83  entries = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
84  If Not entries Then Return -ENOMEM
87  size = perf_callchain_entry__sizeof() * Number of contexts where an event can trigger:* task, softirq, hardirq, nmi.
89  for_each_possible_cpu(cpu)
90  cpu_entries[cpu] = kmalloc_node(size, GFP_KERNEL, cpu_to_node(cpu))
92  If Not cpu_entries[cpu] Then Go to 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  Return 0
100  fail :
101  for_each_possible_cpu(cpu)
102  kfree(cpu_entries[cpu])
103  kfree(entries)
105  Return -ENOMEM
Caller
NameDescribe
get_callchain_buffers