[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180306210041.56736b13@vmware.local.home>
Date: Tue, 6 Mar 2018 21:00:41 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Alan Kao <alankao@...estech.com>
Cc: Palmer Dabbelt <palmer@...ive.com>, Albert Ou <albert@...ive.com>,
"sw-dev@...ups.riscv.org" <sw-dev@...ups.riscv.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Greentime Ying-Han Hu胡英漢)"
<greentime@...estech.com>,
"Zong Zong-Xian Li李宗憲)"
<zong@...estech.com>
Subject: Re: ftrace: Proposal for an Alternative RecordMcount framework
On Wed, 7 Mar 2018 09:47:47 +0800
Alan Kao <alankao@...estech.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
Powered by blists - more mailing lists