Oldify dynamically linked modules only once#177
Conversation
|
This looks good. What's the best/easiest way to test it? |
|
For testing it, I suppose that frama-c or jane-street code based on ocaml-plugin should torture that a bit. |
|
Please, can you explain why that work? And perhaps add comments about that? About the invariant involved?
Thanks |
|
@bobot Thanks for the question, it made me think a bit. Now I start to suspect that this is not even necessary to do those I have absolutely no idea of the potential interaction with the aging. |
But they are not, and for two good reasons: |
|
For aging, I had to make a slight change to the scanning of global roots, and a similar change should work for dll roots after this patch. |
|
@xavierleroy effectively, I didn't consider the second point. |
|
Tested on frama-c, no bug found. |
|
Thanks for the tests. I couldn't find bugs with my testsuite either. |
|
It would be useful, but don't forget I also use debug-runtime on Mac OS and Windows... |
|
@chambart what is the state of this merge request? |
|
@bobot I think it does not need any modification anymore. |
|
Since this an optimization, can you provide some estimate of the expected gains (or even just a micro-benchmark)? |
|
edit: original message is an error, I mixed with pr #156 @alainfrisch On a quite agressively inlined frama-c this was ~0.3s on a ~1s analysis |
|
@chambart Did you notice any improvement when starting Frama-C without performing any analysis? Startup times are increasing (which is a problem when running our unit tests), and I'm wondering if this PR might improve things. |
That sounds great. (LexiFi's application also dynlinks a large part of its code at startup time, so we might see good improvements as well.) Just curious: how does the "agressively inlined" factor interact with the current proposal? |
|
On 23/06/2015 14:29, alainfrisch wrote:
|
|
But this proposal is about the list of global values, not frame tables, and there is exactly one global per dynlinked module, no? (Well I see in #177 that you also propose to support multiple globals per unit.) |
|
oups, sorry @alainfrisch and @yakobowski, I'm mixing this pr with #156. |
|
Ok thanks! My intuition is that the gain for this one would be tiny, but the change is tiny as well. I'm in favour of merging. That said, in general, I strongly advise to provide numbers when proposing an optimization (preferably with realistic benchmarks or even better, real programs; but micro-benchmarks at least otherwise); and also intuitions about when the optimization would be beneficial. This gives some more incentive to look at the proposal. |
|
I just retested (for benchmarking) frama-c with this pr and it segfaulted. I don't know what causes this right now. |
|
Any updates on the segfault? It looks like #178 would be mergeable, but I'm waiting on this one first. |
Wasn't the segfault related to PR#6919: corrupted final_table? |
No, says pchambart |
|
@chambart two questions:
|
|
Not a prerequisite of flambda, and I know how to fix that, but it is a bit more complex than this patch and I don't really have time for that right now. |
|
I'm postponing this PR to 4.04. Speak up if you disagree. |
|
@chambart What is the status for you of this MR? |
|
@bobot, the code here is wrong, and I would still need some time on it. I'm posponing. |
|
Any news on this one? |
|
I'm going to close this; there hasn't been any activity for a year and (forgive me) there are many more important things for @chambart to be getting on with :) |
The list of dynamically linked modules is scanned and oldifyied completely at each minor collection. This patch avoids traversing each one more than once.