aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-15 19:05:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-15 19:05:47 -0400
commitd2d8b146043ae7e250aef1fb312971f6f479d487 (patch)
tree22db8758a5aa0bc850ba8f83fe57b1f679924d0a /kernel/trace/ftrace.c
parent2bbacd1a92788ee334c7e92b765ea16ebab68dfe (diff)
parent693713cbdb3a4bda5a8a678c31f06560bbb14657 (diff)
Merge tag 'trace-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "The major changes in this tracing update includes: - Removal of non-DYNAMIC_FTRACE from 32bit x86 - Removal of mcount support from x86 - Emulating a call from int3 on x86_64, fixes live kernel patching - Consolidated Tracing Error logs file Minor updates: - Removal of klp_check_compiler_support() - kdb ftrace dumping output changes - Accessing and creating ftrace instances from inside the kernel - Clean up of #define if macro - Introduction of TRACE_EVENT_NOP() to disable trace events based on config options And other minor fixes and clean ups" * tag 'trace-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (44 commits) x86: Hide the int3_emulate_call/jmp functions from UML livepatch: Remove klp_check_compiler_support() ftrace/x86: Remove mcount support ftrace/x86_32: Remove support for non DYNAMIC_FTRACE tracing: Simplify "if" macro code tracing: Fix documentation about disabling options using trace_options tracing: Replace kzalloc with kcalloc tracing: Fix partial reading of trace event's id file tracing: Allow RCU to run between postponed startup tests tracing: Fix white space issues in parse_pred() function tracing: Eliminate const char[] auto variables ring-buffer: Fix mispelling of Calculate tracing: probeevent: Fix to make the type of $comm string tracing: probeevent: Do not accumulate on ret variable tracing: uprobes: Re-enable $comm support for uprobe events ftrace/x86_64: Emulate call function while updating in breakpoint handler x86_64: Allow breakpoints to emulate call instructions x86_64: Add gap to int3 to allow for call emulation tracing: kdb: Allow ftdump to skip all but the last few entries tracing: Add trace_total_entries() / trace_total_entries_cpu() ...
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b920358dd8f7..a12aff849c04 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -70,12 +70,8 @@
70#define INIT_OPS_HASH(opsname) \ 70#define INIT_OPS_HASH(opsname) \
71 .func_hash = &opsname.local_hash, \ 71 .func_hash = &opsname.local_hash, \
72 .local_hash.regex_lock = __MUTEX_INITIALIZER(opsname.local_hash.regex_lock), 72 .local_hash.regex_lock = __MUTEX_INITIALIZER(opsname.local_hash.regex_lock),
73#define ASSIGN_OPS_HASH(opsname, val) \
74 .func_hash = val, \
75 .local_hash.regex_lock = __MUTEX_INITIALIZER(opsname.local_hash.regex_lock),
76#else 73#else
77#define INIT_OPS_HASH(opsname) 74#define INIT_OPS_HASH(opsname)
78#define ASSIGN_OPS_HASH(opsname, val)
79#endif 75#endif
80 76
81enum { 77enum {
@@ -3880,7 +3876,7 @@ static int ftrace_hash_move_and_update_ops(struct ftrace_ops *ops,
3880static bool module_exists(const char *module) 3876static bool module_exists(const char *module)
3881{ 3877{
3882 /* All modules have the symbol __this_module */ 3878 /* All modules have the symbol __this_module */
3883 const char this_mod[] = "__this_module"; 3879 static const char this_mod[] = "__this_module";
3884 char modname[MAX_PARAM_PREFIX_LEN + sizeof(this_mod) + 2]; 3880 char modname[MAX_PARAM_PREFIX_LEN + sizeof(this_mod) + 2];
3885 unsigned long val; 3881 unsigned long val;
3886 int n; 3882 int n;
@@ -6265,6 +6261,9 @@ __ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
6265 preempt_disable_notrace(); 6261 preempt_disable_notrace();
6266 6262
6267 do_for_each_ftrace_op(op, ftrace_ops_list) { 6263 do_for_each_ftrace_op(op, ftrace_ops_list) {
6264 /* Stub functions don't need to be called nor tested */
6265 if (op->flags & FTRACE_OPS_FL_STUB)
6266 continue;
6268 /* 6267 /*
6269 * Check the following for each ops before calling their func: 6268 * Check the following for each ops before calling their func:
6270 * if RCU flag is set, then rcu_is_watching() must be true 6269 * if RCU flag is set, then rcu_is_watching() must be true