Commit a0e0fac6 authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'tip/perf/core-2' of...

Merge branch 'tip/perf/core-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core

Pull ftrace fixlets from Steve Rostedt.
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents bcada3d4 87abb3b1
...@@ -2816,7 +2816,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_record_enable); ...@@ -2816,7 +2816,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_record_enable);
* to the buffer after this will fail and return NULL. * to the buffer after this will fail and return NULL.
* *
* This is different than ring_buffer_record_disable() as * This is different than ring_buffer_record_disable() as
* it works like an on/off switch, where as the disable() verison * it works like an on/off switch, where as the disable() version
* must be paired with a enable(). * must be paired with a enable().
*/ */
void ring_buffer_record_off(struct ring_buffer *buffer) void ring_buffer_record_off(struct ring_buffer *buffer)
...@@ -2839,7 +2839,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_record_off); ...@@ -2839,7 +2839,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_record_off);
* ring_buffer_record_off(). * ring_buffer_record_off().
* *
* This is different than ring_buffer_record_enable() as * This is different than ring_buffer_record_enable() as
* it works like an on/off switch, where as the enable() verison * it works like an on/off switch, where as the enable() version
* must be paired with a disable(). * must be paired with a disable().
*/ */
void ring_buffer_record_on(struct ring_buffer *buffer) void ring_buffer_record_on(struct ring_buffer *buffer)
......
...@@ -426,15 +426,15 @@ __setup("trace_buf_size=", set_buf_size); ...@@ -426,15 +426,15 @@ __setup("trace_buf_size=", set_buf_size);
static int __init set_tracing_thresh(char *str) static int __init set_tracing_thresh(char *str)
{ {
unsigned long threshhold; unsigned long threshold;
int ret; int ret;
if (!str) if (!str)
return 0; return 0;
ret = strict_strtoul(str, 0, &threshhold); ret = strict_strtoul(str, 0, &threshold);
if (ret < 0) if (ret < 0)
return 0; return 0;
tracing_thresh = threshhold * 1000; tracing_thresh = threshold * 1000;
return 1; return 1;
} }
__setup("tracing_thresh=", set_tracing_thresh); __setup("tracing_thresh=", set_tracing_thresh);
......
...@@ -2002,7 +2002,7 @@ static int ftrace_function_set_regexp(struct ftrace_ops *ops, int filter, ...@@ -2002,7 +2002,7 @@ static int ftrace_function_set_regexp(struct ftrace_ops *ops, int filter,
static int __ftrace_function_set_filter(int filter, char *buf, int len, static int __ftrace_function_set_filter(int filter, char *buf, int len,
struct function_filter_data *data) struct function_filter_data *data)
{ {
int i, re_cnt, ret; int i, re_cnt, ret = -EINVAL;
int *reset; int *reset;
char **re; char **re;
......
...@@ -1041,6 +1041,8 @@ static int trace_wakeup_test_thread(void *data) ...@@ -1041,6 +1041,8 @@ static int trace_wakeup_test_thread(void *data)
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
schedule(); schedule();
complete(x);
/* we are awake, now wait to disappear */ /* we are awake, now wait to disappear */
while (!kthread_should_stop()) { while (!kthread_should_stop()) {
/* /*
...@@ -1084,24 +1086,21 @@ trace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr) ...@@ -1084,24 +1086,21 @@ trace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr)
/* reset the max latency */ /* reset the max latency */
tracing_max_latency = 0; tracing_max_latency = 0;
/* sleep to let the RT thread sleep too */ while (p->on_rq) {
msleep(100); /*
* Sleep to make sure the RT thread is asleep too.
* On virtual machines we can't rely on timings,
* but we want to make sure this test still works.
*/
msleep(100);
}
/* init_completion(&isrt);
* Yes this is slightly racy. It is possible that for some
* strange reason that the RT thread we created, did not
* call schedule for 100ms after doing the completion,
* and we do a wakeup on a task that already is awake.
* But that is extremely unlikely, and the worst thing that
* happens in such a case, is that we disable tracing.
* Honestly, if this race does happen something is horrible
* wrong with the system.
*/
wake_up_process(p); wake_up_process(p);
/* give a little time to let the thread wake up */ /* Wait for the task to wake up */
msleep(100); wait_for_completion(&isrt);
/* stop the tracing. */ /* stop the tracing. */
tracing_stop(); tracing_stop();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment