[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0812041826210.32726@gandalf.stny.rr.com>
Date: Thu, 4 Dec 2008 18:26:44 -0500 (EST)
From: Steven Rostedt <rostedt@...dmis.org>
To: Frédéric Weisbecker <fweisbec@...il.com>
cc: Ingo Molnar <mingo@...e.hu>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] tracing/ftrace: don't insert TRACE_PRINT during
selftests
On Fri, 5 Dec 2008, Fr?d?ric Weisbecker wrote:
> >
> > Enable this in the mutex lock, and we could make it a normal int.
> >
>
>
> But ftrace_printk can be called from interrupt context. I think we can loose
> some TRACE_PRINT entries at the selftests time since the tracer are not enabled
> by the user at this time, except the boot tracer...
I mean, move it down farther after we acquire the mutex. Should be fine.
-- Steve
>
> >> /*
> >> * Run a selftest on this tracer.
> >> * Here we reset the trace buffer, and set the current
> >> @@ -603,6 +613,7 @@ int register_tracer(struct tracer *type)
> >> /* the test is responsible for initializing and enabling */
> >> pr_info("Testing tracer %s: ", type->name);
> >> ret = type->selftest(type, tr);
> >> + atomic_set(&tracing_selftest_running, 0);
> >> /* the test is responsible for resetting too */
> >> current_trace = saved_tracer;
> >> if (ret) {
> >> @@ -3594,7 +3605,7 @@ int trace_vprintk(unsigned long ip, int depth, const char *fmt, va_list args)
> >> unsigned long flags, irq_flags;
> >> int cpu, len = 0, size, pc;
> >>
> >> - if (tracing_disabled)
> >> + if (tracing_disabled || atomic_read(&tracing_selftest_running))
> >> return 0;
> >>
> >> pc = preempt_count();
> >> --
> >
> > -- Steve
> >
> >
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists