mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: "Ingo Molnar" <mingo@elte.hu>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC v3][PATCH 0/2] Make ftrace able to trace function return
Date: Thu, 13 Nov 2008 01:10:41 +0100	[thread overview]
Message-ID: <c62985530811121610q2f745ed4lac0ea4fc709899d2@mail.gmail.com> (raw)
In-Reply-To: <y0mr65gzncc.fsf@ton.toronto.redhat.com>

2008/11/12 Frank Ch. Eigler <fche@redhat.com>:
>
> Frederic Weisbecker <fweisbec@gmail.com> writes:
>
>> 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. [...]
>
> By the way, one extra complication you may need to deal with, beyond
> normal retprobes, is that by the time dyn-ftrace gets hold of the
> function entry, some part of the function prologue will have been
> executed.  Because the mcount call/sequence is not the first
> instruction in the function body, is there a risk that the call frame
> cannot be reliably modified because of interference from those first
> few other instructions?  Maybe on some architectures/optimization
> levels?
>
> - FChE
>

I don't think that's a problem since CONFIG_FRAME_POINTER is activated
for function tracing.
Whatever instruction is called before the call to mcount, the return
address will remain just
before the frame pointer. It doesn't really differ from usual function
tracing which logs the address
of the parent by using this way.
And the case of dynamic_ftrace doesn't change anything since the call
to mcount is redirected to
ftrace_caller which can handle the return addresses properly.

      reply	other threads:[~2008-11-13  0:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11  5:46 Frederic Weisbecker
2008-11-11  9:43 ` Ingo Molnar
2008-11-11 10:12   ` [PATCH] tracing, x86: function return tracer, fix assembly constraints Ingo Molnar
2008-11-11 11:04   ` [PATCH] tracing: function return tracer, build fix Ingo Molnar
2008-11-11 15:30   ` [RFC v3][PATCH 0/2] Make ftrace able to trace function return Frédéric Weisbecker
2008-11-11 17:14     ` Ingo Molnar
2008-11-11 17:24       ` Frédéric Weisbecker
2008-11-11 18:43         ` Ingo Molnar
2008-11-11 19:14           ` Frédéric Weisbecker
2008-11-12 20:44 ` Frank Ch. Eigler
2008-11-13  0:10   ` 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=c62985530811121610q2f745ed4lac0ea4fc709899d2@mail.gmail.com \
    --to=fweisbec@gmail.com \
    --cc=fche@redhat.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®