函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:event_create_dir

函数原型:static int event_create_dir(struct dentry *parent, struct trace_event_file *file)

返回类型:int

参数:

类型参数名称
struct dentry *parent
struct trace_event_file *file
1978  call等于event_call
1979  tr等于tr
1989  如果字符串比较不等于0则
1990  d_events等于event_subsystem_dir(tr, system, file, parent)
1991  如果非d_events则返回:负ENOMEM
1993  否则d_events等于parent
1996  name等于trace_event_name(call)
1997  dir等于tracefs_create_dir(name, d_events)
1998  如果非dir
1999  打印警告信息("Could not create tracefs '%s' directory\n", name)
2000  返回:负1
2003  如果reg且非 static flags of different events 按位与TRACE_EVENT_FL_IGNORE_ENABLE的值则trace_create_file("enable", 0644, dir, file, & ftrace_enable_fops)
2018  head等于trace_get_fields(call)
2019  如果链表为空
2020  ret等于define_fields(call)
2021  如果ret小于0则
2022  打印警告信息("Could not initialize trace point events/%s\n", name)
2024  返回:负1
2032  如果非 static flags of different events 按位与TRACE_EVENT_FL_IGNORE_ENABLE的值则
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  返回:0
调用者
名称描述
__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