[PATCH] D36351: [lld][ELF] Add profile guided section layout

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 17:10:28 PST 2018


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.

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


More information about the llvm-commits mailing list