[PATCH] D37517: [ELF] - Report orphan sections if -verbose given.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 16:54:13 PDT 2017


Most programs I use don't use linker scripts at all (which is a good
thing).Is Linux kernel a good test case? I wonder if it is sufficiently
large so that benchmark numbers make sense.

On Tue, Sep 19, 2017 at 4:52 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> I really don't expect this to be too expensive.
>
> The cost is proportional to the number or orphan sections, which is
> hopefully very small.
>
> That does remind me that I don't have any testcase that uses a
> linkerscript in the benchmark set I use. Any suggestions of a program to
> add?
>
> Cheers,
> Rafael
>
> Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
>
> > ruiu added a comment.
> >
> >> I performed a quck test which tries to simulate the situation (
> https://ideone.com/p07NYi). It calls some method log() which do nothing
> with random string argument million of times.
> >>  Like if we would have script with million of orphans and verbose set
> to off. It takes 80 milliseconds in total. That probably can be considered
> as the approximation of worst possible scenario ?
> >
> > Well, I do not believe that the cost of calling `log` really matters,
> but your test doesn't seem to test it correctly. We are talking about the
> cost of calling toString on `InputSectionBase *`. I don't think it makes
> much sense to write some different function and measure its performance on
> dummy inputs. Why don't you just profile it?
> >
> >
> > https://reviews.llvm.org/D37517
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/56bf743f/attachment.html>


More information about the llvm-commits mailing list