Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\profile.c Create Date:2022-07-28 10:37:26
Last Modify:2020-03-17 15:11:09 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:profile_init

Proto:int __ref profile_init(void)

Type:int

Parameter:Nothing

106  If Not prof_on Then Return 0
110  prof_len = Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains - Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains >> prof_shift
111  buffer_bytes = prof_len * sizeof(atomic_t)
113  If Not alloc_cpumask_var( & prof_cpu_mask, GFP_KERNEL) Then Return -ENOMEM
116  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
118  prof_buffer = 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).
119  If prof_buffer Then Return 0
122  prof_buffer = alloc_pages_exact(buffer_bytes, GFP_KERNEL | __GFP_ZERO | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.)
124  If prof_buffer Then Return 0
127  prof_buffer = vzalloc(buffer_bytes)
128  If prof_buffer Then Return 0
131  free_cpumask_var(prof_cpu_mask)
132  Return -ENOMEM