From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: "Ingo Molnar" <mingo@elte.hu>,
"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] tracing/ftrace: don't insert TRACE_PRINT during selftests
Date: Fri, 5 Dec 2008 00:04:42 +0100 [thread overview]
Message-ID: <c62985530812041504h19517a43x6edde139afd0f54e@mail.gmail.com> (raw)
In-Reply-To: <c62985530812041503g4e6f8fa8uc9b7a1166fd3a907@mail.gmail.com>
2008/12/5 Frédéric Weisbecker <fweisbec@gmail.com>:
> 2008/12/4 Steven Rostedt <rostedt@goodmis.org>:
>> The comment style should be:
>>
>> /*
>> * comment
>> * comment
>> * comment
>> */
>
> Sorry, will fix it.
>
>>
>>> +static atomic_t tracing_selftest_running = ATOMIC_INIT(0);
>>
>> Do we need that is atomic? Also, it needs to be __read_mostly.
>
>
> I thought it should be atomic to be sure the value is synchronized
> on smp when read. But actually that should have been more likely an
> int with smp_wb after writing it.
>
>>> +
>>> /* For tracers that don't implement custom flags */
>>> static struct tracer_opt dummy_tracer_opt[] = {
>>> { }
>>> @@ -589,6 +597,8 @@ int register_tracer(struct tracer *type)
>>> struct tracer *saved_tracer = current_trace;
>>> struct trace_array *tr = &global_trace;
>>> int i;
>>> +
>>> + atomic_set(&tracing_selftest_running, 1);
>>
>> 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...
>
But with the boot tracer enabled, there is no selftest actually :-)
next prev parent reply other threads:[~2008-12-04 23:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 22:47 Frederic Weisbecker
2008-12-04 22:55 ` Steven Rostedt
2008-12-04 23:03 ` Frédéric Weisbecker
2008-12-04 23:04 ` Frédéric Weisbecker [this message]
2008-12-04 23:26 ` Steven Rostedt
2008-12-05 13:48 ` Ingo Molnar
2008-12-05 14:01 ` Frédéric Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c62985530812041504h19517a43x6edde139afd0f54e@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®