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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 16:52:06 PDT 2017


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


More information about the llvm-commits mailing list