lkml.org 
[lkml]   [2018]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ftrace: Proposal for an Alternative RecordMcount framework
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

\
 
 \ /
  Last update: 2018-03-07 03:01    [W:0.100 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site