[PATCH] Add preload method.
kledzik at apple.com
kledzik at apple.com
Fri Sep 12 16:22:23 PDT 2014
I assume that preload() return immediately, and that it is expected to spin off some thread to parse an archive member? If so, we have no overall throttle on how many threads will be started (a hundred undefines could spin up 100 threads). Also, how is the archive reader to coordinate if the Resolver gets to the point it really wants an object file to fulfill and undefine but some other thread is busy parsing that member?
Don't we just have a producer/consumer problem where the archive reader is the producer and the resolver is the consumer. The consumer is single threaded and currently queries (pulls from) the producer on the consumer thread. Can the driver start up some producer task for archive reading to pre-parse archives? Rather than blindly parsing all members, your idea of passing undefined symbols names to the producer is a good idea.
http://reviews.llvm.org/D5340
More information about the llvm-commits
mailing list