LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC v2][PATCH 0/2] Make ftrace able to trace function return
@ 2008-11-07 17:47 Frederic Weisbecker
  0 siblings, 0 replies; only message in thread
From: Frederic Weisbecker @ 2008-11-07 17:47 UTC (permalink / raw)
  To: Ingo Molnar, Steven Rostedt, Linux Kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-07 17:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-07 17:47 [RFC v2][PATCH 0/2] Make ftrace able to trace function return Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).