mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alan Kao <alankao@andestech.com>
Cc: "Palmer Dabbelt" <palmer@sifive.com>,
	"Albert Ou" <albert@sifive.com>,
	"sw-dev@groups.riscv.org" <sw-dev@groups.riscv.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Greentime Ying-Han Hu(胡英漢)" <greentime@andestech.com>,
	"Zong Zong-Xian Li( 李宗憲)" <zong@andestech.com>
Subject: Re: ftrace: Proposal for an Alternative RecordMcount framework
Date: Tue, 6 Mar 2018 21:00:41 -0500	[thread overview]
Message-ID: <20180306210041.56736b13@vmware.local.home> (raw)
In-Reply-To: <20180307014746.GA25460@andestech.com>

On Wed, 7 Mar 2018 09:47:47 +0800
Alan Kao <alankao@andestech.com> wrote:


> > Please allow me to state the problem more clearly here.  I hope this helps.
> > 
> > 1. locations of mcount are recorded in a per-file basis.
> > 2. to optimize the binary, the linker turns on some aggressive
> >    options, including relaxation.
> > 3. the optimizations changes the original offset.
> > 4. already recorded mcount call-sites no longer point to their
> >    real positions.
> > 5. still a linked vmlinux is made.
> > 6. dynamic ftrace breaks the real logic in the kernel space,
> >    panics happen.
> > 
> > Thanks,
> > Alan  
> 
> Any comments on this?

Sorry, I've been traveling and falling behind in this. I did read this
when I was offline but forgot to reply when I was back online.

> 
> BTW, the introduced framework has no effects on any other architectures that
> works fine.  This feature should be configurable and turned on only when the
> arch has aggressive link-time optimizations.
> 
> If you consider this appropriate, I will send the patch to this once it gets 
> ready.  Currently this is targeting at RISC-V and upcoming NDS32.

I see the issue you explained above and it makes sense. Perhaps make it
an option that can be enabled by anyone, and archs that require
aggressive link time optimizations would just select it.

-- Steve

      reply	other threads:[~2018-03-07  2:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 10:04 Alan Kao
2018-02-27 21:12 ` Steven Rostedt
2018-03-01  2:05   ` Alan Kao
2018-03-07  1:47     ` Alan Kao
2018-03-07  2:00       ` Steven Rostedt [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=20180306210041.56736b13@vmware.local.home \
    --to=rostedt@goodmis.org \
    --cc=alankao@andestech.com \
    --cc=albert@sifive.com \
    --cc=greentime@andestech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=palmer@sifive.com \
    --cc=sw-dev@groups.riscv.org \
    --cc=zong@andestech.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

Powered by JetHome