Skip to content

Remove -ddebug-gc-assert-parsed-dead

Han-Wen Nienhuys requested to merge dev/hanwen/drop-assert-dead into master

This was introduced in commit 7785ac38 (Nov 3, 2006) as a mechanism to detect memory leaks: when an object is found alive when we are not parsing a file (eg. a Grob), print out a warning, indicating that some code is retaining references across .ly files that it should not.

This mechanism has pointed to a handful of leaks over the past years, there are several downsides to it:

  • it doesn't work with GUILE 2.x

  • it is imperfect with GUILE 1.8, given conservative GC (especially on 32-bit platforms)

  • it requires an extra GC call for each file. If the heap is large relative to the footprint of a .ly file, this leads to excessive GC'ing. Removing this speeds up the regtest by 37%

  • problems are hard to track down to a cause; the only diagnostic is the type of object retained.

Benchmark (T460p, 2Ghz):

Before:
        Command being timed: "make -j4 -C input/regression out=test lysdoc-test"
        User time (seconds): 245.19
        System time (seconds): 6.14
        Percent of CPU this job got: 300%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 1:23.62

After:
        Command being timed: "make -j4 -C input/regression out=test lysdoc-test"
        User time (seconds): 154.32
        System time (seconds): 6.34
        Percent of CPU this job got: 275%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:58.41
Edited by Jonas Hahnfeld

Merge request reports