提交 7967b3e0 编写于 作者: S Steven Rostedt (Red Hat) 提交者: Steven Rostedt

tracing: Rename struct ftrace_subsystem_dir to trace_subsystem_dir

The name "ftrace" really refers to the function hook infrastructure. It
is not about the trace_events. The structure ftrace_subsystem_dir holds
the information about trace event subsystems. It should not be named
ftrace, rename it to trace_subsystem_dir.
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 687fcc4a
...@@ -313,7 +313,7 @@ trace_event_name(struct trace_event_call *call) ...@@ -313,7 +313,7 @@ trace_event_name(struct trace_event_call *call)
} }
struct trace_array; struct trace_array;
struct ftrace_subsystem_dir; struct trace_subsystem_dir;
enum { enum {
FTRACE_EVENT_FL_ENABLED_BIT, FTRACE_EVENT_FL_ENABLED_BIT,
...@@ -355,7 +355,7 @@ struct trace_event_file { ...@@ -355,7 +355,7 @@ struct trace_event_file {
struct event_filter *filter; struct event_filter *filter;
struct dentry *dir; struct dentry *dir;
struct trace_array *tr; struct trace_array *tr;
struct ftrace_subsystem_dir *system; struct trace_subsystem_dir *system;
struct list_head triggers; struct list_head triggers;
/* /*
......
...@@ -992,7 +992,7 @@ struct event_subsystem { ...@@ -992,7 +992,7 @@ struct event_subsystem {
int ref_count; int ref_count;
}; };
struct ftrace_subsystem_dir { struct trace_subsystem_dir {
struct list_head list; struct list_head list;
struct event_subsystem *subsystem; struct event_subsystem *subsystem;
struct trace_array *tr; struct trace_array *tr;
...@@ -1056,7 +1056,7 @@ extern void print_event_filter(struct trace_event_file *file, ...@@ -1056,7 +1056,7 @@ extern void print_event_filter(struct trace_event_file *file,
struct trace_seq *s); struct trace_seq *s);
extern int apply_event_filter(struct trace_event_file *file, extern int apply_event_filter(struct trace_event_file *file,
char *filter_string); char *filter_string);
extern int apply_subsystem_event_filter(struct ftrace_subsystem_dir *dir, extern int apply_subsystem_event_filter(struct trace_subsystem_dir *dir,
char *filter_string); char *filter_string);
extern void print_subsystem_event_filter(struct event_subsystem *system, extern void print_subsystem_event_filter(struct event_subsystem *system,
struct trace_seq *s); struct trace_seq *s);
......
...@@ -449,14 +449,14 @@ static void __get_system(struct event_subsystem *system) ...@@ -449,14 +449,14 @@ static void __get_system(struct event_subsystem *system)
system_refcount_inc(system); system_refcount_inc(system);
} }
static void __get_system_dir(struct ftrace_subsystem_dir *dir) static void __get_system_dir(struct trace_subsystem_dir *dir)
{ {
WARN_ON_ONCE(dir->ref_count == 0); WARN_ON_ONCE(dir->ref_count == 0);
dir->ref_count++; dir->ref_count++;
__get_system(dir->subsystem); __get_system(dir->subsystem);
} }
static void __put_system_dir(struct ftrace_subsystem_dir *dir) static void __put_system_dir(struct trace_subsystem_dir *dir)
{ {
WARN_ON_ONCE(dir->ref_count == 0); WARN_ON_ONCE(dir->ref_count == 0);
/* If the subsystem is about to be freed, the dir must be too */ /* If the subsystem is about to be freed, the dir must be too */
...@@ -467,14 +467,14 @@ static void __put_system_dir(struct ftrace_subsystem_dir *dir) ...@@ -467,14 +467,14 @@ static void __put_system_dir(struct ftrace_subsystem_dir *dir)
kfree(dir); kfree(dir);
} }
static void put_system(struct ftrace_subsystem_dir *dir) static void put_system(struct trace_subsystem_dir *dir)
{ {
mutex_lock(&event_mutex); mutex_lock(&event_mutex);
__put_system_dir(dir); __put_system_dir(dir);
mutex_unlock(&event_mutex); mutex_unlock(&event_mutex);
} }
static void remove_subsystem(struct ftrace_subsystem_dir *dir) static void remove_subsystem(struct trace_subsystem_dir *dir)
{ {
if (!dir) if (!dir)
return; return;
...@@ -828,7 +828,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt, ...@@ -828,7 +828,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos) loff_t *ppos)
{ {
const char set_to_char[4] = { '?', '0', '1', 'X' }; const char set_to_char[4] = { '?', '0', '1', 'X' };
struct ftrace_subsystem_dir *dir = filp->private_data; struct trace_subsystem_dir *dir = filp->private_data;
struct event_subsystem *system = dir->subsystem; struct event_subsystem *system = dir->subsystem;
struct trace_event_call *call; struct trace_event_call *call;
struct trace_event_file *file; struct trace_event_file *file;
...@@ -873,7 +873,7 @@ static ssize_t ...@@ -873,7 +873,7 @@ static ssize_t
system_enable_write(struct file *filp, const char __user *ubuf, size_t cnt, system_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos) loff_t *ppos)
{ {
struct ftrace_subsystem_dir *dir = filp->private_data; struct trace_subsystem_dir *dir = filp->private_data;
struct event_subsystem *system = dir->subsystem; struct event_subsystem *system = dir->subsystem;
const char *name = NULL; const char *name = NULL;
unsigned long val; unsigned long val;
...@@ -1132,7 +1132,7 @@ static LIST_HEAD(event_subsystems); ...@@ -1132,7 +1132,7 @@ static LIST_HEAD(event_subsystems);
static int subsystem_open(struct inode *inode, struct file *filp) static int subsystem_open(struct inode *inode, struct file *filp)
{ {
struct event_subsystem *system = NULL; struct event_subsystem *system = NULL;
struct ftrace_subsystem_dir *dir = NULL; /* Initialize for gcc */ struct trace_subsystem_dir *dir = NULL; /* Initialize for gcc */
struct trace_array *tr; struct trace_array *tr;
int ret; int ret;
...@@ -1181,7 +1181,7 @@ static int subsystem_open(struct inode *inode, struct file *filp) ...@@ -1181,7 +1181,7 @@ static int subsystem_open(struct inode *inode, struct file *filp)
static int system_tr_open(struct inode *inode, struct file *filp) static int system_tr_open(struct inode *inode, struct file *filp)
{ {
struct ftrace_subsystem_dir *dir; struct trace_subsystem_dir *dir;
struct trace_array *tr = inode->i_private; struct trace_array *tr = inode->i_private;
int ret; int ret;
...@@ -1214,7 +1214,7 @@ static int system_tr_open(struct inode *inode, struct file *filp) ...@@ -1214,7 +1214,7 @@ static int system_tr_open(struct inode *inode, struct file *filp)
static int subsystem_release(struct inode *inode, struct file *file) static int subsystem_release(struct inode *inode, struct file *file)
{ {
struct ftrace_subsystem_dir *dir = file->private_data; struct trace_subsystem_dir *dir = file->private_data;
trace_array_put(dir->tr); trace_array_put(dir->tr);
...@@ -1235,7 +1235,7 @@ static ssize_t ...@@ -1235,7 +1235,7 @@ static ssize_t
subsystem_filter_read(struct file *filp, char __user *ubuf, size_t cnt, subsystem_filter_read(struct file *filp, char __user *ubuf, size_t cnt,
loff_t *ppos) loff_t *ppos)
{ {
struct ftrace_subsystem_dir *dir = filp->private_data; struct trace_subsystem_dir *dir = filp->private_data;
struct event_subsystem *system = dir->subsystem; struct event_subsystem *system = dir->subsystem;
struct trace_seq *s; struct trace_seq *s;
int r; int r;
...@@ -1262,7 +1262,7 @@ static ssize_t ...@@ -1262,7 +1262,7 @@ static ssize_t
subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
loff_t *ppos) loff_t *ppos)
{ {
struct ftrace_subsystem_dir *dir = filp->private_data; struct trace_subsystem_dir *dir = filp->private_data;
char *buf; char *buf;
int err; int err;
...@@ -1499,7 +1499,7 @@ static struct dentry * ...@@ -1499,7 +1499,7 @@ static struct dentry *
event_subsystem_dir(struct trace_array *tr, const char *name, event_subsystem_dir(struct trace_array *tr, const char *name,
struct trace_event_file *file, struct dentry *parent) struct trace_event_file *file, struct dentry *parent)
{ {
struct ftrace_subsystem_dir *dir; struct trace_subsystem_dir *dir;
struct event_subsystem *system; struct event_subsystem *system;
struct dentry *entry; struct dentry *entry;
...@@ -2754,7 +2754,7 @@ static __init void event_test_stuff(void) ...@@ -2754,7 +2754,7 @@ static __init void event_test_stuff(void)
*/ */
static __init void event_trace_self_tests(void) static __init void event_trace_self_tests(void)
{ {
struct ftrace_subsystem_dir *dir; struct trace_subsystem_dir *dir;
struct trace_event_file *file; struct trace_event_file *file;
struct trace_event_call *call; struct trace_event_call *call;
struct event_subsystem *system; struct event_subsystem *system;
......
...@@ -848,7 +848,7 @@ static inline void __remove_filter(struct trace_event_file *file) ...@@ -848,7 +848,7 @@ static inline void __remove_filter(struct trace_event_file *file)
remove_filter_string(file->filter); remove_filter_string(file->filter);
} }
static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir, static void filter_free_subsystem_preds(struct trace_subsystem_dir *dir,
struct trace_array *tr) struct trace_array *tr)
{ {
struct trace_event_file *file; struct trace_event_file *file;
...@@ -873,7 +873,7 @@ static inline void __free_subsystem_filter(struct trace_event_file *file) ...@@ -873,7 +873,7 @@ static inline void __free_subsystem_filter(struct trace_event_file *file)
} }
} }
static void filter_free_subsystem_filters(struct ftrace_subsystem_dir *dir, static void filter_free_subsystem_filters(struct trace_subsystem_dir *dir,
struct trace_array *tr) struct trace_array *tr)
{ {
struct trace_event_file *file; struct trace_event_file *file;
...@@ -1735,7 +1735,7 @@ struct filter_list { ...@@ -1735,7 +1735,7 @@ struct filter_list {
struct event_filter *filter; struct event_filter *filter;
}; };
static int replace_system_preds(struct ftrace_subsystem_dir *dir, static int replace_system_preds(struct trace_subsystem_dir *dir,
struct trace_array *tr, struct trace_array *tr,
struct filter_parse_state *ps, struct filter_parse_state *ps,
char *filter_string) char *filter_string)
...@@ -1935,7 +1935,7 @@ int create_event_filter(struct trace_event_call *call, ...@@ -1935,7 +1935,7 @@ int create_event_filter(struct trace_event_call *call,
* Identical to create_filter() except that it creates a subsystem filter * Identical to create_filter() except that it creates a subsystem filter
* and always remembers @filter_str. * and always remembers @filter_str.
*/ */
static int create_system_filter(struct ftrace_subsystem_dir *dir, static int create_system_filter(struct trace_subsystem_dir *dir,
struct trace_array *tr, struct trace_array *tr,
char *filter_str, struct event_filter **filterp) char *filter_str, struct event_filter **filterp)
{ {
...@@ -2012,7 +2012,7 @@ int apply_event_filter(struct trace_event_file *file, char *filter_string) ...@@ -2012,7 +2012,7 @@ int apply_event_filter(struct trace_event_file *file, char *filter_string)
return err; return err;
} }
int apply_subsystem_event_filter(struct ftrace_subsystem_dir *dir, int apply_subsystem_event_filter(struct trace_subsystem_dir *dir,
char *filter_string) char *filter_string)
{ {
struct event_subsystem *system = dir->subsystem; struct event_subsystem *system = dir->subsystem;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册