From: Tim Bird <tim.bird@am.sony.com>
To: � <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/4] tracing/function-return-tracer: Support for dynamic ftrace on function return tracer
Date: Wed, 26 Nov 2008 10:23:11 -0800 [thread overview]
Message-ID: <492D940F.6090500@am.sony.com> (raw)
In-Reply-To: <c62985530811241421t1cd56b4el1ada0754df9a229@mail.gmail.com>
� wrote:
> 2008/11/24 Steven Rostedt <rostedt@goodmis.org>:
>> On Sun, 16 Nov 2008, Frederic Weisbecker wrote:
>>> static void ftrace_replace_code(int enable)
>>> @@ -1405,10 +1417,17 @@ int register_ftrace_function(struct ftrace_ops *ops)
>>> return -1;
>>>
>>> mutex_lock(&ftrace_sysctl_lock);
>>> +
>>> + if (ftrace_tracing_type == FTRACE_TYPE_RETURN) {
>>> + ret = -EBUSY;
>>> + goto out;
>>> + }
>>> +
>> Why do we need to disable all new tracing functions when we do return
>> tracing??
>>
>> -- Steve
>>
>>> ret = __register_ftrace_function(ops);
>>> ftrace_startup();
>>> - mutex_unlock(&ftrace_sysctl_lock);
>>>
>>> +out:
>>> + mutex_unlock(&ftrace_sysctl_lock);
>>> return ret;
>>> }
>>>
>
> You will see the same test when trying to register a return handler,
> it verifies that normal ftrace is not running.
> Otherwise it will fail.
> I made ftrace and ftrace-return not abled to work simultaneously for the moment.
> That made the integration of ftrace-return into dynamic tracing much
> more simpler...
>
> But if someone needs to enable both tracing at the same time, I can change it...
Very sorry I'm coming to this thread late. I didn't notice it until
today.
Not to question the whole approach, and sorry if this was
discussed before, but why wasn't -finstrument-functions used
to instrument the function exits. This worked well for KFT
(See http://elinux.org/Kernel_Function_Trace). I'm not sure if the
function prologue and epilogue modifications done by -mcount are
different than -finstrument-functions, but I thought I remember something
about Steven testing -finstrument-functions in an early version of ftrace.
By the way, I'm really excited to see this "function_cost" stuff being
worked on. It has proven to be extremely useful for analyzing early boot
latencies at Sony.
Sorry again I didn't catch this and previous related threads
earlier. I have some post-processing tools which might be useful here.
Also, I've found it very handy to have the capability to filter by minimum
function duration. Is there any work to do that with the
current system. If not, maybe I could take a look at that and see if
I can add something.
Regards,
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================
next prev parent reply other threads:[~2008-11-26 18:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-16 5:02 [PATCH 4/4] tracing/function-return-tracer: Support for dynamic ftrace on function return tracer Frederic Weisbecker
2008-11-24 22:08 ` Steven Rostedt
2008-11-24 22:21 ` Frédéric Weisbecker
2008-11-24 22:43 ` Steven Rostedt
2008-11-26 18:23 ` Tim Bird [this message]
2008-11-26 19:16 ` Frédéric Weisbecker
2008-11-26 19:21 ` Steven Rostedt
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=492D940F.6090500@am.sony.com \
--to=tim.bird@am.sony.com \
--cc=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