All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [RFC v2][PATCH 0/2] Make ftrace able to trace function return
Date: Fri, 07 Nov 2008 18:47:40 +0100	[thread overview]
Message-ID: <49147F3C.2000104@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

This V2 fixes a lot of problem. There were some deadlocks caused by the
nmi which bypass the local_irq_save, the tracing recursion and the full return
values for 64 bits which were not handled for the most significant bits (edx).

I don't see anymore bugs which break the system stability.
There is just one last issue: if you break and cat anymore the pipe a lot of times, there will
be lesser traces. I guess there are some functions that don't return in this case
and then some slots on the bitmap can't be allocated for the following functions.

But this is just a minor bug which doesn't affect the system and doesn't bring memory
leak. I will correct this little issue.

You can find a trace resulted from this patch in attachment.
---

This patchset adds the ability for ftrace to trace the function even on call time and on
return time. So we can now measure the time of execution of the most part of the functions
inside the kernel with ftrace.

The first patch bring the low level tools to add the support of return tracing on X86-32. It is
totally separated from the traditional implementation of ftrace and doesn't support
dynamic ftrace at this time.

The second patch adds a tracer based on the ring-buffer which measure the time of execution of the functions inside the kernel.

---
 arch/x86/kernel/Makefile              |   11 ++
 arch/x86/kernel/entry_32.S            |   22 +++
 arch/x86/kernel/ftrace.c              |  233 +++++++++++++++++++++++++++++++-
 include/linux/ftrace.h                |   16 +++
 kernel/extable.c                      |    4 +-
 kernel/module.c                       |    2 +-
 kernel/trace/Kconfig                  |   13 ++
 kernel/trace/Makefile                 |    1 +
 kernel/trace/ftrace.c                 |   15 ++
 kernel/trace/trace.c                  |   57 +++++++-
 kernel/trace/trace.h                  |   22 +++
 kernel/trace/trace_functions_return.c |   98 ++++++++++++++
 12 files changed, 475 insertions(+), 19 deletions(-)

[-- Attachment #2: trace.bz2 --]
[-- Type: application/x-bzip, Size: 198712 bytes --]

                 reply	other threads:[~2008-11-07 17:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=49147F3C.2000104@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.