Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Create a new node and associated debugfs entry. Needs to be called with* node_lock held.

Proto:static struct gcov_node *new_node(struct gcov_node *parent, struct gcov_info *info, const char *name)

Type:struct gcov_node

Parameter:

TypeParameterName
struct gcov_node *parent
struct gcov_info *info
const char *name
434  node = 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).
435  If Not node Then Go to err_nomem
437  If info Then
438  loaded_info = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
440  If Not loaded_info Then Go to err_nomem
443  Basic initialization of a new node.
445  If info Then
446  dentry = debugfs_create_file(For a filename .tmp_filename.ext return filename.ext. Needed to compensate* for filename skewing caused by the mod-versioning mechanism., 0600, dentry, node, & gcov_data_fops)
448  Else dentry = debugfs_create_dir(name, dentry)
450  If info Then Create links to additional files (usually .c and .gcno files) which the* gcov tool expects to find in the same directory as the gcov data file.
452  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
453  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
455  Return node
457  err_nomem :
458  kfree(node)
459  pr_warn("out of memory\n")
460  Return NULL
Caller
NameDescribe
add_nodeCreate a node for a given profiling data set and add it to all lists and* debugfs. Needs to be called with node_lock held.