Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Expects to have event_mutex held when called

Proto:static int create_event_toplevel_files(struct dentry *parent, struct trace_array *tr)

Type:int

Parameter:

TypeParameterName
struct dentry *parent
struct trace_array *tr
2947  entry = tracefs_create_file("set_event", 0644, parent, tr, & ftrace_set_event_fops)
2949  If Not entry Then
2950  pr_warn("Could not create tracefs 'set_event' entry\n")
2951  Return -ENOMEM
2954  d_events = tracefs_create_dir("events", parent)
2955  If Not d_events Then
2956  pr_warn("Could not create tracefs 'events' directory\n")
2957  Return -ENOMEM
2960  entry = trace_create_file("enable", 0644, d_events, tr, & ftrace_tr_enable_fops)
2962  If Not entry Then
2963  pr_warn("Could not create tracefs 'enable' entry\n")
2964  Return -ENOMEM
2969  entry = tracefs_create_file("set_event_pid", 0644, parent, tr, & ftrace_set_event_pid_fops)
2971  If Not entry Then pr_warn("Could not create tracefs 'set_event_pid' entry\n")
2975  entry = trace_create_file("header_page", 0444, d_events, ring_buffer_print_page_header, & ftrace_show_header_fops)
2978  If Not entry Then pr_warn("Could not create tracefs 'header_page' entry\n")
2981  entry = trace_create_file("header_event", 0444, d_events, The ring buffer header is special. We must manually up keep it., & ftrace_show_header_fops)
2984  If Not entry Then pr_warn("Could not create tracefs 'header_event' entry\n")
2987  event_dir = d_events
2989  Return 0
Caller
NameDescribe
event_trace_add_tracervent_trace_add_tracer - add a instance of a trace_array to events*@parent: The parent dentry to place the files/directories for events in*@tr: The trace array associated with these events* When a new instance is created, it needs to set up its events
early_event_add_tracerThe top trace array already had its file descriptors created.* Now the files themselves need to be created.