Skip to content

Commit

Permalink
trace: rename struct module entry for trace enums
Browse files Browse the repository at this point in the history
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/[email protected]

Signed-off-by: Jeremy Linton <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
  • Loading branch information
jlintonarm authored and rostedt committed Jun 13, 2017
1 parent 00f4b65 commit 99be647
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/linux/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand All @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 99be647

Please sign in to comment.