Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:event_subsystem_dir

Proto:static struct dentry *event_subsystem_dir(struct trace_array *tr, const char *name, struct trace_event_file *file, struct dentry *parent)

Type:struct dentry

Parameter:

TypeParameterName
struct trace_array *tr
const char *name
struct trace_event_file *file
struct dentry *parent
1910  system = subsystem
1911  If strcmp(name, name) == 0 Then
1912  nr_events++
1913  system = dir
1914  Return entry
1920  If strcmp(name, name) == 0 Then Break
1924  If list == event_subsystems Then system = NULL
1927  dir = Allocation memory
1928  If Not dir Then Go to out_fail
1931  If Not system Then
1932  system = create_new_subsystem(name)
1933  If Not system Then Go to out_free
1935  Else __get_system(system)
1938  entry = tracefs_create_dir(name, parent)
1939  If Not entry Then
1940  pr_warn("Failed to create system directory %s\n", name)
1941  __put_system(system)
1942  Go to out_free
1945  tr = tr
1946  ref_count = 1
1947  nr_events = 1
1948  subsystem = system
1949  system = dir
1951  entry = tracefs_create_file("filter", 0644, entry, dir, & ftrace_subsystem_filter_fops)
1953  If Not entry Then
1954  kfree(filter)
1955  filter = NULL
1956  pr_warn("Could not create tracefs '%s/filter' entry\n", name)
1959  trace_create_file("enable", 0644, entry, dir, & ftrace_system_enable_fops)
1962  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.
1964  Return entry
1966  out_free :
1967  kfree(dir)
1968  out_fail :
1970  If Not dir || Not system Then pr_warn("No memory to create event subsystem %s\n", name)
1972  Return NULL
Caller
NameDescribe
event_create_dir