This is an archive of the discontinued LLVM Phabricator instance.

[dsymutil] Apply recursion workaround for threading
ClosedPublic

Authored by JDevlieghere on Apr 2 2018, 10:37 AM.

Details

Summary

The DwarfLinker can have some very deep recursion that can max out the
(significantly smaller) stack when using threads. We don't want this
limitation when we only have a single thread. We already have this
workaround for the architecture-related threading. This patch applies
the same workaround to the parallel analysis and cloning.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Apr 2 2018, 10:37 AM
JDevlieghere added a subscriber: friss.

I see you're also changing the default from 2 threads to 1 thread. Is this expected?

friss added inline comments.Apr 2 2018, 12:56 PM
llvm/tools/dsymutil/DwarfLinker.cpp
4304 ↗(On Diff #140647)

There will never be more than 2 threads running from that pool, right? Why not leave a hardcoded '2' here?

Feedback Davide & Fred

JDevlieghere marked an inline comment as done.Apr 3 2018, 5:51 AM
davide accepted this revision.Apr 3 2018, 7:45 AM

LGTM.

This revision is now accepted and ready to land.Apr 3 2018, 7:45 AM
This revision was automatically updated to reflect the committed changes.