函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events.c Create Date:2022-07-27 13:28:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Expects to have event_mutex held when called

函数原型:static int create_event_toplevel_files(struct dentry *parent, struct trace_array *tr)

返回类型:int

参数:

类型参数名称
struct dentry *parent
struct trace_array *tr
2947  entry等于tracefs_create_file("set_event", 0644, parent, tr, & ftrace_set_event_fops)
2949  如果非entry
2950  打印警告信息("Could not create tracefs 'set_event' entry\n")
2951  返回:负ENOMEM
2954  d_events等于tracefs_create_dir("events", parent)
2955  如果非d_events
2956  打印警告信息("Could not create tracefs 'events' directory\n")
2957  返回:负ENOMEM
2960  entry等于trace_create_file("enable", 0644, d_events, tr, & ftrace_tr_enable_fops)
2962  如果非entry
2963  打印警告信息("Could not create tracefs 'enable' entry\n")
2964  返回:负ENOMEM
2969  entry等于tracefs_create_file("set_event_pid", 0644, parent, tr, & ftrace_set_event_pid_fops)
2971  如果非entry打印警告信息("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  如果非entry打印警告信息("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  如果非entry打印警告信息("Could not create tracefs 'header_event' entry\n")
2987  event_dir等于d_events
2989  返回:0
调用者
名称描述
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.