summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-09-09 16:55:53 +0200
committerClark Williams <williams@redhat.com>2012-04-10 16:40:41 -0500
commit3ac15a373636b2eff1c087942bd8849c7d3815d7 (patch)
treeda90e9f9422c0ea3fc589382bee832b3a4725537 /kernel
parent0d73d2e8f8e22f42ab8ae771c8723538a668930a (diff)
ftrace-crap.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.c26
-rw-r--r--kernel/trace/trace.h1
2 files changed, 24 insertions, 3 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 58b22d9c0949..87f6121a48fd 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -414,11 +414,13 @@ EXPORT_SYMBOL_GPL(tracing_is_on);
*/
void trace_wake_up(void)
{
+#ifndef CONFIG_PREEMPT_RT_FULL
const unsigned long delay = msecs_to_jiffies(2);
if (trace_flags & TRACE_ITER_BLOCK)
return;
schedule_delayed_work(&wakeup_work, delay);
+#endif
}
static int __init set_buf_size(char *str)
@@ -775,6 +777,12 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu)
}
#endif /* CONFIG_TRACER_MAX_TRACE */
+#ifndef CONFIG_PREEMPT_RT_FULL
+static void default_wait_pipe(struct trace_iterator *iter);
+#else
+#define default_wait_pipe poll_wait_pipe
+#endif
+
/**
* register_tracer - register a tracer with the ftrace system.
* @type - the plugin for the tracer
@@ -3303,6 +3311,7 @@ static int tracing_release_pipe(struct inode *inode, struct file *file)
return 0;
}
+#ifndef CONFIG_PREEMPT_RT_FULL
static unsigned int
tracing_poll_pipe(struct file *filp, poll_table *poll_table)
{
@@ -3324,8 +3333,7 @@ tracing_poll_pipe(struct file *filp, poll_table *poll_table)
}
}
-
-void default_wait_pipe(struct trace_iterator *iter)
+static void default_wait_pipe(struct trace_iterator *iter)
{
DEFINE_WAIT(wait);
@@ -3336,6 +3344,20 @@ void default_wait_pipe(struct trace_iterator *iter)
finish_wait(&trace_wait, &wait);
}
+#else
+static unsigned int
+tracing_poll_pipe(struct file *filp, poll_table *poll_table)
+{
+ struct trace_iterator *iter = filp->private_data;
+
+ if ((trace_flags & TRACE_ITER_BLOCK) || !trace_empty(iter))
+ return POLLIN | POLLRDNORM;
+ poll_wait_pipe(iter);
+ if (!trace_empty(iter))
+ return POLLIN | POLLRDNORM;
+ return 0;
+}
+#endif
/*
* This is a make-shift waitqueue.
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 95059f091a24..d6e195146e05 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -354,7 +354,6 @@ void trace_init_global_iter(struct trace_iterator *iter);
void tracing_iter_reset(struct trace_iterator *iter, int cpu);
-void default_wait_pipe(struct trace_iterator *iter);
void poll_wait_pipe(struct trace_iterator *iter);
void ftrace(struct trace_array *tr,