Reason for skipping sanity checking threads and mut_lists before a GC?

Ömer Sinan Ağacan omeragacan at gmail.com
Tue Mar 3 15:10:40 UTC 2020


Hi,

With `+RTS -DS` we call this function before and after a GC:

    void checkSanity (bool after_gc, bool major_gc)
    {
        checkFullHeap(after_gc && major_gc);

        checkFreeListSanity();

        // always check the stacks in threaded mode, because checkHeap()
        // does nothing in this case.
        if (after_gc) {
            checkMutableLists();
            checkGlobalTSOList(true);
        }
    }

For some reason this skips mut lists and threads before a GC, I don't understand
why that is necessary. Does anyone know the reason?

Thanks,

Ömer


More information about the ghc-devs mailing list