diff options
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index f2bd275bb60f..9b2e20893033 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -359,11 +359,13 @@ static DECLARE_DELAYED_WORK(wakeup_work, wakeup_work_handler); */ 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) @@ -719,6 +721,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 @@ -1123,6 +1131,8 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags, ((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) | ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0); + + entry->migrate_disable = (tsk) ? __migrate_disabled(tsk) & 0xFF : 0; } EXPORT_SYMBOL_GPL(tracing_generic_entry_update); @@ -1850,9 +1860,10 @@ static void print_lat_help_header(struct seq_file *m) seq_puts(m, "# | / _----=> need-resched \n"); seq_puts(m, "# || / _---=> hardirq/softirq \n"); seq_puts(m, "# ||| / _--=> preempt-depth \n"); - seq_puts(m, "# |||| / delay \n"); - seq_puts(m, "# cmd pid ||||| time | caller \n"); - seq_puts(m, "# \\ / ||||| \\ | / \n"); + seq_puts(m, "# |||| / _--=> migrate-disable\n"); + seq_puts(m, "# ||||| / delay \n"); + seq_puts(m, "# cmd pid |||||| time | caller \n"); + seq_puts(m, "# \\ / ||||| \\ | / \n"); } static void print_func_help_header(struct seq_file *m) @@ -3189,6 +3200,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) { @@ -3210,8 +3222,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); @@ -3222,6 +3233,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. |