[PATCH] D43945: [dsymutil] Perform analyzing and cloning DIE in parallel
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 1 07:55:22 PST 2018
JDevlieghere created this revision.
JDevlieghere added reviewers: friss, aprantl, davide.
This patch makes dsymutil perform `analyzeContextInfo` and `CloneDIEs` in
parallel. For the same object file, there is a dependency between the two.
However, we can do `analyzeContextInfo` for the next object file while cloning
DIEs for the current. This is exactly the approach taken in this patch.
For WebCore, this leads to a performance improvement of **29%** and for clang we
see similar results with at **32%** improvement.
A large part of the change is related to passing around objects during linking,
instead of having one "current" counterpart accessible by all the linker's
methods. We group these objects into a new struct called `LinkContext` which
exists for every object file.
A big thanks to Pete Cooper (@pete) who came up with the idea and a PoC.
---------------------------------------------
WebCore (before)
---------------------------------------------
78.13 real 72.85 user 4.80 sys
77.92 real 72.75 user 4.87 sys
77.91 real 72.69 user 4.91 sys
78.38 real 73.01 user 5.00 sys
79.48 real 73.99 user 5.03 sys
---------------------------------------------
78.36 real
---------------------------------------------
---------------------------------------------
WebCore (after)
---------------------------------------------
55.22 real 74.76 user 6.16 sys
54.22 real 73.72 user 5.89 sys
55.13 real 74.62 user 6.02 sys
55.83 real 74.89 user 6.49 sys
54.87 real 74.23 user 6.10 sys
---------------------------------------------
55.05 real
---------------------------------------------
---------------------------------------------
Clang (before)
---------------------------------------------
82.16 real 78.16 user 3.61 sys
82.92 real 78.79 user 3.69 sys
84.59 real 79.85 user 3.95 sys
84.45 real 79.80 user 3.93 sys
85.11 real 80.23 user 4.07 sys
---------------------------------------------
83.85 real
---------------------------------------------
---------------------------------------------
Clang (after)
---------------------------------------------
56.28 real 81.32 user 6.53 sys
56.04 real 81.24 user 6.39 sys
56.65 real 81.42 user 6.36 sys
57.06 real 81.75 user 6.89 sys
55.65 real 80.40 user 6.59 sys
---------------------------------------------
56.34 real
---------------------------------------------
Repository:
rL LLVM
https://reviews.llvm.org/D43945
Files:
test/tools/dsymutil/basic-linking.test
tools/dsymutil/DebugMap.h
tools/dsymutil/DwarfLinker.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43945.136516.patch
Type: text/x-patch
Size: 66790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180301/40b98f6e/attachment-0001.bin>
More information about the llvm-commits
mailing list