trace: rename struct module entry for trace enums
authorJeremy Linton <jeremy.linton@arm.com>
Wed, 31 May 2017 21:56:44 +0000 (16:56 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 13 Jun 2017 21:09:31 +0000 (17:09 -0400)
Each module has a list of enum's its contributing to the
enum map, rename that entry to reflect its use by more than
enums.

Link: http://lkml.kernel.org/r/20170531215653.3240-4-jeremy.linton@arm.com
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/module.h
kernel/module.c
kernel/trace/trace.c

index 46b48043d74130c62e4900cf8efc40218f2a0549..8eb9a1e693e5b3ae245e93771b4489d5307b08b6 100644 (file)
@@ -442,8 +442,8 @@ struct module {
 #ifdef CONFIG_EVENT_TRACING
        struct trace_event_call **trace_events;
        unsigned int num_trace_events;
-       struct trace_eval_map **trace_enums;
-       unsigned int num_trace_enums;
+       struct trace_eval_map **trace_evals;
+       unsigned int num_trace_evals;
 #endif
 #ifdef CONFIG_FTRACE_MCOUNT_RECORD
        unsigned int num_ftrace_callsites;
index 9ec4713c5eee2685e0dca61cca65452b9c373392..df1c4a9e7abb4160f350b063994c8bdf14429f03 100644 (file)
@@ -3077,9 +3077,9 @@ static int find_module_sections(struct module *mod, struct load_info *info)
        mod->trace_events = section_objs(info, "_ftrace_events",
                                         sizeof(*mod->trace_events),
                                         &mod->num_trace_events);
-       mod->trace_enums = section_objs(info, "_ftrace_eval_map",
-                                       sizeof(*mod->trace_enums),
-                                       &mod->num_trace_enums);
+       mod->trace_evals = section_objs(info, "_ftrace_eval_map",
+                                       sizeof(*mod->trace_evals),
+                                       &mod->num_trace_evals);
 #endif
 #ifdef CONFIG_TRACING
        mod->trace_bprintk_fmt_start = section_objs(info, "__trace_printk_fmt",
index 46fac3f63af182e34472610f70971c66322a6207..061abd8ba101c20899e8d644114cc41c05bc7109 100644 (file)
@@ -7746,7 +7746,7 @@ static void __init trace_enum_init(void)
 #ifdef CONFIG_MODULES
 static void trace_module_add_enums(struct module *mod)
 {
-       if (!mod->num_trace_enums)
+       if (!mod->num_trace_evals)
                return;
 
        /*
@@ -7756,7 +7756,7 @@ static void trace_module_add_enums(struct module *mod)
        if (trace_module_has_bad_taint(mod))
                return;
 
-       trace_insert_enum_map(mod, mod->trace_enums, mod->num_trace_enums);
+       trace_insert_enum_map(mod, mod->trace_evals, mod->num_trace_evals);
 }
 
 #ifdef CONFIG_TRACE_ENUM_MAP_FILE
@@ -7765,7 +7765,7 @@ static void trace_module_remove_enums(struct module *mod)
        union trace_enum_map_item *map;
        union trace_enum_map_item **last = &trace_enum_maps;
 
-       if (!mod->num_trace_enums)
+       if (!mod->num_trace_evals)
                return;
 
        mutex_lock(&trace_enum_mutex);