Memory Leak in CoreM (CoreWriter)
|Reported by:||afarmer||Owned by:|
|Type of failure:||Compile-time performance bug||Test Case:|
|Related Tickets:||Differential Revisions:|
While running HERMIT on extended examples, we noticed that the CoreWriter component of CoreM is building up unevaluated SimplCount expressions. Attached is a one line patch to make the field in the CoreWriter record strict, which fixes the leak.
Also attached are heap profiles before and after to verify the fix. (You'll notice we have other memory leaks in HERMIT to address, the important bit being the big CoreWriter peak is gone in after.pdf.) These were generated by running a large number of HERMIT transformations in a batch, with HERMIT calling ghc with +RTS -hT -RTS.
I'm not sure how this affects compilation time or allocation when SimplCount is not the VerySimplCount constructor. Would the nofib suite answer these questions?
Change History (24)
comment:4 Changed 2 years ago by simonpj
- difficulty set to Unknown
- Resolution set to fixed
- Status changed from patch to closed
comment:16 Changed 2 years ago by afarmer
- Owner igloo deleted
- Resolution fixed deleted
- Status changed from closed to new