-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design multi-threading support #97
Comments
The more I think about it and look at the original approach, the less I like it and the more I think it is not suitable given our architecture. Our DWARF parsing as well as various other bits are lazy by design: we only parse data if it is being asked for. Ideally that wouldn't be the only mode of operation (#433), but it is how things work at this point and anything else is orthogonal: it just makes sense in many contexts this library is likely being used in: you generally don't want to parse a multi-GiB file eagerly if all you need is function information from a single compilation unit. In my opinion the best way to multi-thread this kind of code is by (conceptually), replacing all Such an approach would be much more flexible to work with than hard coding thread usage in certain locations. Because we do not parse everything eagerly, it's hard to tell how best to distribute work to threads. But that is precisely what would be dictated by program structure ("run this function on this thread") if we directly use threads. It would also mean that users could be given some control over threading properties: they could provide a |
The main problem, I suspect, will be that the moment anything looking like a thread is involved there is a requirement for data to be |
Well, that's not quite true of course. One can have scoped threads that alleviate this constraint, but at least as outlined above it would presumably be impossible to marry the two designs, I think. |
We should come up with a way to support multi-threading where beneficial, to speed things up. See #93 for when we removed earlier support for that in DWARF parsing code, which wasn't accessible by users.
The text was updated successfully, but these errors were encountered: