Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace.c Create Date:2022-07-28 11:58:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:allocate_cmdlines_buffer

Proto:static int allocate_cmdlines_buffer(unsigned int val, struct saved_cmdlines_buffer *s)

Type:int

Parameter:

TypeParameterName
unsigned intval
struct saved_cmdlines_buffer *s
2050  map_cmdline_to_pid = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
2053  If Not map_cmdline_to_pid Then Return -ENOMEM
2056  saved_cmdlines = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
2057  If Not saved_cmdlines Then
2058  kfree(map_cmdline_to_pid)
2059  Return -ENOMEM
2062  cmdline_idx = 0
2063  cmdline_num = val
2064  memset( & map_pid_to_cmdline, NO_CMDLINE_MAP, size of map_pid_to_cmdline )
2066  memset(map_cmdline_to_pid, NO_CMDLINE_MAP, val * size of map_cmdline_to_pid )
2069  Return 0
Caller
NameDescribe
trace_create_savedcmd
tracing_resize_saved_cmdlines