tracing: Fix userstacktrace option for instances
commit5.4-rM2-2.2.x-imx-squashedbcee527895
upstream. When the instances were able to use their own options, the userstacktrace option was left hardcoded for the top level. This made the instance userstacktrace option bascially into a nop, and will confuse users that set it, but nothing happens (I was confused when it happened to me!) Cc: stable@vger.kernel.org Fixes:16270145ce
("tracing: Add trace options for core options to instances") Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
dbbf6cdab5
commit
f68f5bdfef
|
@ -160,7 +160,8 @@ static union trace_eval_map_item *trace_eval_maps;
|
||||||
#endif /* CONFIG_TRACE_EVAL_MAP_FILE */
|
#endif /* CONFIG_TRACE_EVAL_MAP_FILE */
|
||||||
|
|
||||||
static int tracing_set_tracer(struct trace_array *tr, const char *buf);
|
static int tracing_set_tracer(struct trace_array *tr, const char *buf);
|
||||||
static void ftrace_trace_userstack(struct ring_buffer *buffer,
|
static void ftrace_trace_userstack(struct trace_array *tr,
|
||||||
|
struct ring_buffer *buffer,
|
||||||
unsigned long flags, int pc);
|
unsigned long flags, int pc);
|
||||||
|
|
||||||
#define MAX_TRACER_SIZE 100
|
#define MAX_TRACER_SIZE 100
|
||||||
|
@ -2621,7 +2622,7 @@ void trace_buffer_unlock_commit_regs(struct trace_array *tr,
|
||||||
* two. They are not that meaningful.
|
* two. They are not that meaningful.
|
||||||
*/
|
*/
|
||||||
ftrace_trace_stack(tr, buffer, flags, regs ? 0 : STACK_SKIP, pc, regs);
|
ftrace_trace_stack(tr, buffer, flags, regs ? 0 : STACK_SKIP, pc, regs);
|
||||||
ftrace_trace_userstack(buffer, flags, pc);
|
ftrace_trace_userstack(tr, buffer, flags, pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2936,13 +2937,14 @@ EXPORT_SYMBOL_GPL(trace_dump_stack);
|
||||||
static DEFINE_PER_CPU(int, user_stack_count);
|
static DEFINE_PER_CPU(int, user_stack_count);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc)
|
ftrace_trace_userstack(struct trace_array *tr,
|
||||||
|
struct ring_buffer *buffer, unsigned long flags, int pc)
|
||||||
{
|
{
|
||||||
struct trace_event_call *call = &event_user_stack;
|
struct trace_event_call *call = &event_user_stack;
|
||||||
struct ring_buffer_event *event;
|
struct ring_buffer_event *event;
|
||||||
struct userstack_entry *entry;
|
struct userstack_entry *entry;
|
||||||
|
|
||||||
if (!(global_trace.trace_flags & TRACE_ITER_USERSTACKTRACE))
|
if (!(tr->trace_flags & TRACE_ITER_USERSTACKTRACE))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2981,7 +2983,8 @@ ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc)
|
||||||
preempt_enable();
|
preempt_enable();
|
||||||
}
|
}
|
||||||
#else /* CONFIG_USER_STACKTRACE_SUPPORT */
|
#else /* CONFIG_USER_STACKTRACE_SUPPORT */
|
||||||
static void ftrace_trace_userstack(struct ring_buffer *buffer,
|
static void ftrace_trace_userstack(struct trace_array *tr,
|
||||||
|
struct ring_buffer *buffer,
|
||||||
unsigned long flags, int pc)
|
unsigned long flags, int pc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue