[PATCH] D36351: [lld][ELF] Add profile guided section layout
Michael Spencer via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 18:21:50 PST 2018
On Wed, Jan 31, 2018 at 5:10 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:
> Michael Spencer <bigcheesegs at gmail.com> writes:
>
> > I wasn't able to duplicate the crash at all (Windows or Linux, debug with
> > asserts), but from the log it I'm pretty sure it was related the issue I
> > working on. Here's an updated patch.
>
> The new patch fixes the crash, thanks.
>
> The next issue is that the linker produces non deterministic
> output. With the testcase I shared for the crash, run
>
> $ ld.lld --call-graph-ordering-file call-graph.txt @response.txt -o test1
> --no-threads
> $ ld.lld --call-graph-ordering-file call-graph.txt @response.txt -o test2
> --no-threads
> $ cmp test1 test2
>
> And you should be able to reproduce the non determinism.
>
Looking into this.
>
> Another thing I noticed that the vertices of hottest edge in the
> callgrpah is not close to each other in the output:
>
> 1026: 00000000017c3770 246 FUNC LOCAL DEFAULT 9 _
> ZL15compRelocationsIN4llvm6object7ELFTypeILNS0_
> 7support10endiannessE1ELb1EEENS1_12Elf_Rel_ImplIS5_Lb1EEEEbRKT0_SA_
> 41309: 0000000003235e60 838 FUNC WEAK DEFAULT 9
> _ZSt17__merge_sort_loopIPN4llvm6object12Elf_Rel_ImplINS1_7ELFTypeILNS0_
> 7support10endiannessE1ELb1EEELb1EEES8_lN9__gnu_cxx5__ops15_
> Iter_comp_iterIPFbRKS7_SD_EEEEvT_SH_T0_T1_T2_
>
> Cheers,
> Rafael
>
That's because it couldn't find _ZL15compRelocationsIN4llvm6obj
ect7ELFTypeILNS0_7support10endiannessE1ELb1EEENS1_12Elf_Rel_ImplIS5_Lb1EEEEbRKT0_SA_
in the symbol table as it's a local symbol. This isn't a problem for the
llvm based approach as it doesn't need to look up symbols.
- Michael Spencer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180131/a7a14c1e/attachment.html>
More information about the llvm-commits
mailing list