diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-31 00:38:21 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-31 00:38:21 +0100 |
commit | e1e302d8a9ab06ba8d7d5ec503d8996e6cf0eca4 (patch) | |
tree | 6a6c805fdfd6a2f6433956cbee348b2c3a277784 /kernel/trace/trace.c | |
parent | 944ac4259e39801c843a915c3da8194ac9af0440 (diff) | |
parent | 7f82f000ed030d1108b4de47d9e2d556092980c6 (diff) |
Merge branch 'linus' into tracing/ftrace
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 47f46cbdd86..8741e5c4313 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -34,6 +34,7 @@ #include <linux/stacktrace.h> #include <linux/ring_buffer.h> +#include <linux/irqflags.h> #include "trace.h" @@ -873,7 +874,7 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) preempt_enable_notrace(); } -#ifdef CONFIG_FTRACE +#ifdef CONFIG_FUNCTION_TRACER static void function_trace_call(unsigned long ip, unsigned long parent_ip) { @@ -887,9 +888,6 @@ function_trace_call(unsigned long ip, unsigned long parent_ip) if (unlikely(!ftrace_function_enabled)) return; - if (skip_trace(ip)) - return; - pc = preempt_count(); resched = need_resched(); preempt_disable_notrace(); @@ -2401,9 +2399,10 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf, int i; size_t ret; + ret = cnt; + if (cnt > max_tracer_type_len) cnt = max_tracer_type_len; - ret = cnt; if (copy_from_user(&buf, ubuf, cnt)) return -EFAULT; @@ -2436,8 +2435,8 @@ tracing_set_trace_write(struct file *filp, const char __user *ubuf, out: mutex_unlock(&trace_types_lock); - if (ret == cnt) - filp->f_pos += cnt; + if (ret > 0) + filp->f_pos += ret; return ret; } @@ -3120,7 +3119,7 @@ void ftrace_dump(void) dump_ran = 1; /* No turning back! */ - ftrace_kill_atomic(); + ftrace_kill(); for_each_tracing_cpu(cpu) { atomic_inc(&global_trace.data[cpu]->disabled); |