public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: "Ming Lei" <tom.leiming@gmail.com>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, "Ingo Molnar" <mingo@elte.hu>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Steven Rostedt" <srostedt@redhat.com>
Subject: Re: [RFC] ftrace: support tracing functions in one module
Date: Sun, 03 Aug 2008 08:19:28 -0400	[thread overview]
Message-ID: <y0mljzee1f3.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <d82e647a0808030050n3b72d96dh91c0ac94eadc34f@mail.gmail.com> (Ming Lei's message of "Sun, 3 Aug 2008 15:50:19 +0800")

"Ming Lei" <tom.leiming@gmail.com> writes:

> [...]  For example, one may only have interest in functions calling
> in usbcore.ko, but he must trace all the functions calling in the
> kernel, so the tracing result is too large to use it. [...]

Until ftrace gains this ability, you could use systemtap:

# cat callret.stp
probe $1.call { printf ("%s <- %s\n", thread_indent(1), probefunc()) }
probe $1.return { printf ("%s -> %s\n", thread_indent(-1), probefunc()) }
# stap callret.stp 'module("usbcore").function("*")'
[...]
^C
#

(One can also add conditions based on function parameters, processes,
whatever; soon it'll be easy to trace all function parameters.)


- FChE

  reply	other threads:[~2008-08-03 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03  7:50 [RFC] ftrace: support tracing functions in one module Ming Lei
2008-08-03 12:19 ` Frank Ch. Eigler [this message]
2008-08-03 14:45 ` Steven Rostedt
2008-08-04  2:11   ` Ming Lei
2008-08-04 16:15     ` Arnaldo Carvalho de Melo
2008-08-04 16:28       ` Steven Rostedt
2008-08-04 17:18         ` Arnaldo Carvalho de Melo
2008-08-03 15:16 ` Abhishek Sagar

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=y0mljzee1f3.fsf@ton.toronto.redhat.com \
    --to=fche@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=srostedt@redhat.com \
    --cc=tom.leiming@gmail.com \
    /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