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:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:event_create_dir

Proto:static int event_create_dir(struct dentry *parent, struct trace_event_file *file)

Type:int

Parameter:

TypeParameterName
struct dentry *parent
struct trace_event_file *file
1978  call = event_call
1979  tr = tr
1989  If strcmp(system, TRACE_SYSTEM) != 0 Then
1990  d_events = event_subsystem_dir(tr, system, file, parent)
1991  If Not d_events Then Return -ENOMEM
1993  Else d_events = parent
1996  name = trace_event_name(call)
1997  dir = tracefs_create_dir(name, d_events)
1998  If Not dir Then
1999  pr_warn("Could not create tracefs '%s' directory\n", name)
2000  Return -1
2003  If reg && Not ( static flags of different events & TRACE_EVENT_FL_IGNORE_ENABLE) Then trace_create_file("enable", 0644, dir, file, & ftrace_enable_fops)
2018  head = trace_get_fields(call)
2019  If list_empty - tests whether a list is empty*@head: the list to test. Then
2020  ret = define_fields(call)
2021  If ret < 0 Then
2022  pr_warn("Could not initialize trace point events/%s\n", name)
2024  Return -1
2032  If Not ( static flags of different events & TRACE_EVENT_FL_IGNORE_ENABLE) Then
2033  trace_create_file("filter", 0644, dir, file, & ftrace_event_filter_fops)
2036  trace_create_file("trigger", 0644, dir, file, & event_trigger_fops)
2044  trace_create_file("format", 0444, dir, call, & ftrace_event_format_fops)
2053  Return 0
Caller
NameDescribe
__trace_add_new_eventAdd an event to a trace directory
__trace_early_add_event_dirsThe top level array has already had its trace_event_file* descriptors created in order to allow for early events to* be recorded. This function is called after the tracefs has been* initialized, and we now have to create the files associated