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 ---------------------------------------------