aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-05-13 14:59:40 -0400
committerSteven Rostedt <rostedt@goodmis.org>2015-05-13 14:59:40 -0400
commit7967b3e0c40ff72fb2cf44d3b50e2cb388ef6c67 (patch)
tree49616966408f5de94e7ea8f057e3deff82d2d089
parent687fcc4aee4567df14e31e82d6993418b826f408 (diff)
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: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--include/linux/trace_events.h4
-rw-r--r--kernel/trace/trace.h4
-rw-r--r--kernel/trace/trace_events.c26
-rw-r--r--kernel/trace/trace_events_filter.c10
4 files changed, 22 insertions, 22 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 15617798849c..d4ad58ec684a 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -313,7 +313,7 @@ trace_event_name(struct trace_event_call *call)
313} 313}
314 314
315struct trace_array; 315struct trace_array;
316struct ftrace_subsystem_dir; 316struct trace_subsystem_dir;
317 317
318enum { 318enum {
319 FTRACE_EVENT_FL_ENABLED_BIT, 319 FTRACE_EVENT_FL_ENABLED_BIT,
@@ -355,7 +355,7 @@ struct trace_event_file {
355 struct event_filter *filter; 355 struct event_filter *filter;
356 struct dentry *dir; 356 struct dentry *dir;
357 struct trace_array *tr; 357 struct trace_array *tr;
358 struct ftrace_subsystem_dir *system; 358 struct trace_subsystem_dir *system;
359 struct list_head triggers; 359 struct list_head triggers;
360 360
361 /* 361 /*
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 64de3837c383..4c41fcda83ed 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -992,7 +992,7 @@ struct event_subsystem {
992 int ref_count; 992 int ref_count;
993}; 993};
994 994
995struct ftrace_subsystem_dir { 995struct trace_subsystem_dir {
996 struct list_head list; 996 struct list_head list;
997 struct event_subsystem *subsystem; 997 struct event_subsystem *subsystem;
998 struct trace_array *tr; 998 struct trace_array *tr;
@@ -1056,7 +1056,7 @@ extern void print_event_filter(struct trace_event_file *file,
1056 struct trace_seq *s); 1056 struct trace_seq *s);
1057extern int apply_event_filter(struct trace_event_file *file, 1057extern int apply_event_filter(struct trace_event_file *file,
1058 char *filter_string); 1058 char *filter_string);
1059extern int apply_subsystem_event_filter(struct ftrace_subsystem_dir *dir, 1059extern int apply_subsystem_event_filter(struct trace_subsystem_dir *dir,
1060 char *filter_string); 1060 char *filter_string);
1061extern void print_subsystem_event_filter(struct event_subsystem *system, 1061extern void print_subsystem_event_filter(struct event_subsystem *system,
1062 struct trace_seq *s); 1062 struct trace_seq *s);
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index df491ce4f3b0..58984c252aac 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -449,14 +449,14 @@ static void __get_system(struct event_subsystem *system)
449 system_refcount_inc(system); 449 system_refcount_inc(system);
450} 450}
451 451
452static void __get_system_dir(struct ftrace_subsystem_dir *dir) 452static void __get_system_dir(struct trace_subsystem_dir *dir)
453{ 453{
454 WARN_ON_ONCE(dir->ref_count == 0); 454 WARN_ON_ONCE(dir->ref_count == 0);
455 dir->ref_count++; 455 dir->ref_count++;
456 __get_system(dir->subsystem); 456 __get_system(dir->subsystem);
457} 457}
458 458
459static void __put_system_dir(struct ftrace_subsystem_dir *dir) 459static void __put_system_dir(struct trace_subsystem_dir *dir)
460{ 460{
461 WARN_ON_ONCE(dir->ref_count == 0); 461 WARN_ON_ONCE(dir->ref_count == 0);
462 /* If the subsystem is about to be freed, the dir must be too */ 462 /* 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 kfree(dir); 467 kfree(dir);
468} 468}
469 469
470static void put_system(struct ftrace_subsystem_dir *dir) 470static void put_system(struct trace_subsystem_dir *dir)
471{ 471{
472 mutex_lock(&event_mutex); 472 mutex_lock(&event_mutex);
473 __put_system_dir(dir); 473 __put_system_dir(dir);
474 mutex_unlock(&event_mutex); 474 mutex_unlock(&event_mutex);
475} 475}
476 476
477static void remove_subsystem(struct ftrace_subsystem_dir *dir) 477static void remove_subsystem(struct trace_subsystem_dir *dir)
478{ 478{
479 if (!dir) 479 if (!dir)
480 return; 480 return;
@@ -828,7 +828,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
828 loff_t *ppos) 828 loff_t *ppos)
829{ 829{
830 const char set_to_char[4] = { '?', '0', '1', 'X' }; 830 const char set_to_char[4] = { '?', '0', '1', 'X' };
831 struct ftrace_subsystem_dir *dir = filp->private_data; 831 struct trace_subsystem_dir *dir = filp->private_data;
832 struct event_subsystem *system = dir->subsystem; 832 struct event_subsystem *system = dir->subsystem;
833 struct trace_event_call *call; 833 struct trace_event_call *call;
834 struct trace_event_file *file; 834 struct trace_event_file *file;
@@ -873,7 +873,7 @@ static ssize_t
873system_enable_write(struct file *filp, const char __user *ubuf, size_t cnt, 873system_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
874 loff_t *ppos) 874 loff_t *ppos)
875{ 875{
876 struct ftrace_subsystem_dir *dir = filp->private_data; 876 struct trace_subsystem_dir *dir = filp->private_data;
877 struct event_subsystem *system = dir->subsystem; 877 struct event_subsystem *system = dir->subsystem;
878 const char *name = NULL; 878 const char *name = NULL;
879 unsigned long val; 879 unsigned long val;
@@ -1132,7 +1132,7 @@ static LIST_HEAD(event_subsystems);
1132static int subsystem_open(struct inode *inode, struct file *filp) 1132static int subsystem_open(struct inode *inode, struct file *filp)
1133{ 1133{
1134 struct event_subsystem *system = NULL; 1134 struct event_subsystem *system = NULL;
1135 struct ftrace_subsystem_dir *dir = NULL; /* Initialize for gcc */ 1135 struct trace_subsystem_dir *dir = NULL; /* Initialize for gcc */
1136 struct trace_array *tr; 1136 struct trace_array *tr;
1137 int ret; 1137 int ret;
1138 1138
@@ -1181,7 +1181,7 @@ static int subsystem_open(struct inode *inode, struct file *filp)
1181 1181
1182static int system_tr_open(struct inode *inode, struct file *filp) 1182static int system_tr_open(struct inode *inode, struct file *filp)
1183{ 1183{
1184 struct ftrace_subsystem_dir *dir; 1184 struct trace_subsystem_dir *dir;
1185 struct trace_array *tr = inode->i_private; 1185 struct trace_array *tr = inode->i_private;
1186 int ret; 1186 int ret;
1187 1187
@@ -1214,7 +1214,7 @@ static int system_tr_open(struct inode *inode, struct file *filp)
1214 1214
1215static int subsystem_release(struct inode *inode, struct file *file) 1215static int subsystem_release(struct inode *inode, struct file *file)
1216{ 1216{
1217 struct ftrace_subsystem_dir *dir = file->private_data; 1217 struct trace_subsystem_dir *dir = file->private_data;
1218 1218
1219 trace_array_put(dir->tr); 1219 trace_array_put(dir->tr);
1220 1220
@@ -1235,7 +1235,7 @@ static ssize_t
1235subsystem_filter_read(struct file *filp, char __user *ubuf, size_t cnt, 1235subsystem_filter_read(struct file *filp, char __user *ubuf, size_t cnt,
1236 loff_t *ppos) 1236 loff_t *ppos)
1237{ 1237{
1238 struct ftrace_subsystem_dir *dir = filp->private_data; 1238 struct trace_subsystem_dir *dir = filp->private_data;
1239 struct event_subsystem *system = dir->subsystem; 1239 struct event_subsystem *system = dir->subsystem;
1240 struct trace_seq *s; 1240 struct trace_seq *s;
1241 int r; 1241 int r;
@@ -1262,7 +1262,7 @@ static ssize_t
1262subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, 1262subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt,
1263 loff_t *ppos) 1263 loff_t *ppos)
1264{ 1264{
1265 struct ftrace_subsystem_dir *dir = filp->private_data; 1265 struct trace_subsystem_dir *dir = filp->private_data;
1266 char *buf; 1266 char *buf;
1267 int err; 1267 int err;
1268 1268
@@ -1499,7 +1499,7 @@ static struct dentry *
1499event_subsystem_dir(struct trace_array *tr, const char *name, 1499event_subsystem_dir(struct trace_array *tr, const char *name,
1500 struct trace_event_file *file, struct dentry *parent) 1500 struct trace_event_file *file, struct dentry *parent)
1501{ 1501{
1502 struct ftrace_subsystem_dir *dir; 1502 struct trace_subsystem_dir *dir;
1503 struct event_subsystem *system; 1503 struct event_subsystem *system;
1504 struct dentry *entry; 1504 struct dentry *entry;
1505 1505
@@ -2754,7 +2754,7 @@ static __init void event_test_stuff(void)
2754 */ 2754 */
2755static __init void event_trace_self_tests(void) 2755static __init void event_trace_self_tests(void)
2756{ 2756{
2757 struct ftrace_subsystem_dir *dir; 2757 struct trace_subsystem_dir *dir;
2758 struct trace_event_file *file; 2758 struct trace_event_file *file;
2759 struct trace_event_call *call; 2759 struct trace_event_call *call;
2760 struct event_subsystem *system; 2760 struct event_subsystem *system;
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index d535f3bf2aa2..203dd3750e91 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -848,7 +848,7 @@ static inline void __remove_filter(struct trace_event_file *file)
848 remove_filter_string(file->filter); 848 remove_filter_string(file->filter);
849} 849}
850 850
851static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir, 851static void filter_free_subsystem_preds(struct trace_subsystem_dir *dir,
852 struct trace_array *tr) 852 struct trace_array *tr)
853{ 853{
854 struct trace_event_file *file; 854 struct trace_event_file *file;
@@ -873,7 +873,7 @@ static inline void __free_subsystem_filter(struct trace_event_file *file)
873 } 873 }
874} 874}
875 875
876static void filter_free_subsystem_filters(struct ftrace_subsystem_dir *dir, 876static void filter_free_subsystem_filters(struct trace_subsystem_dir *dir,
877 struct trace_array *tr) 877 struct trace_array *tr)
878{ 878{
879 struct trace_event_file *file; 879 struct trace_event_file *file;
@@ -1735,7 +1735,7 @@ struct filter_list {
1735 struct event_filter *filter; 1735 struct event_filter *filter;
1736}; 1736};
1737 1737
1738static int replace_system_preds(struct ftrace_subsystem_dir *dir, 1738static int replace_system_preds(struct trace_subsystem_dir *dir,
1739 struct trace_array *tr, 1739 struct trace_array *tr,
1740 struct filter_parse_state *ps, 1740 struct filter_parse_state *ps,
1741 char *filter_string) 1741 char *filter_string)
@@ -1935,7 +1935,7 @@ int create_event_filter(struct trace_event_call *call,
1935 * Identical to create_filter() except that it creates a subsystem filter 1935 * Identical to create_filter() except that it creates a subsystem filter
1936 * and always remembers @filter_str. 1936 * and always remembers @filter_str.
1937 */ 1937 */
1938static int create_system_filter(struct ftrace_subsystem_dir *dir, 1938static int create_system_filter(struct trace_subsystem_dir *dir,
1939 struct trace_array *tr, 1939 struct trace_array *tr,
1940 char *filter_str, struct event_filter **filterp) 1940 char *filter_str, struct event_filter **filterp)
1941{ 1941{
@@ -2012,7 +2012,7 @@ int apply_event_filter(struct trace_event_file *file, char *filter_string)
2012 return err; 2012 return err;
2013} 2013}
2014 2014
2015int apply_subsystem_event_filter(struct ftrace_subsystem_dir *dir, 2015int apply_subsystem_event_filter(struct trace_subsystem_dir *dir,
2016 char *filter_string) 2016 char *filter_string)
2017{ 2017{
2018 struct event_subsystem *system = dir->subsystem; 2018 struct event_subsystem *system = dir->subsystem;