From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/function-return-tracer: clean up task start/exit callbacks
Date: Sun, 23 Nov 2008 17:11:41 +0100 [thread overview]
Message-ID: <c62985530811230811q633349e5neb79fb6841c642ff@mail.gmail.com> (raw)
In-Reply-To: <20081123082132.GB30453@elte.hu>
2008/11/23 Ingo Molnar <mingo@elte.hu>:
>
> * Frederic Weisbecker <fweisbec@gmail.com> wrote:
>
>> Impact: use deeper tracing depth safely
>>
>> Some tests showed that function return tracing needed a more deeper depth
>> of function calls. But it could be unsafe to store these return addresses
>> to the stack.
>> So these arrays will now be allocated dynamically into task_struct of current
>> only when the tracer is activated.
>>
>> Typical scheme when tracer is activated:
>> _ allocate a return stack for each task in global list.
>> _ fork: allocate the return stack for the newly created task
>> _ exit: free return stack of current
>> _ idle init: same as fork
>>
>> I chose a default depth of 50. I don't have anymore overruns (didn't tested for
>> a long time).
>>
>> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> ---
>> arch/x86/include/asm/ftrace.h | 1 -
>> arch/x86/include/asm/thread_info.h | 29 -----------
>> arch/x86/kernel/ftrace.c | 29 ++++++-----
>> include/linux/ftrace.h | 5 ++
>> include/linux/sched.h | 23 ++++-----
>> kernel/exit.c | 5 ++-
>> kernel/fork.c | 4 ++
>> kernel/sched.c | 3 +
>> kernel/trace/ftrace.c | 96 +++++++++++++++++++++++++++++++++++-
>> 9 files changed, 137 insertions(+), 58 deletions(-)
>
> nice! Applied to tip/tracing/function-return-tracer and i started
> testing it as well.
>
> I've done the small cleanup below on top of your patch - we try to
> avoid #ifdefs in core kernel code as much as possible, by hiding
> .config details into include files.
>
> Ingo
Ok thanks!
prev parent reply other threads:[~2008-11-23 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 5:22 [PATCH] tracing/function-return-tracer: store return stack into task_struct and allocate it dynamically Frederic Weisbecker
2008-11-23 8:21 ` [PATCH] tracing/function-return-tracer: clean up task start/exit callbacks Ingo Molnar
2008-11-23 16:11 ` Frédéric Weisbecker [this message]
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=c62985530811230811q633349e5neb79fb6841c642ff@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®