7490255 mtrace: Start tracing immediately.

Authored and Committed by Carlos O'Donell 4 years ago
    mtrace: Start tracing immediately.
    
    We switch from starting to trace in the constructor to initializing
    the tracing on first use, and recording any records right away.
    This means we won't loose any records as other constructors start
    up earlier than our constructor.
    
    We leave the destructor to close the mapping.
    
    We now only loose 1 event at worst, the initial calloc that is part
    of the first dlsym to find the real calloc. All other events should
    be captured (ignoring dl-minimal.c allocations) with the exception
    of events that ran in destructors with priority 101 (matching our
    own).
    
        
file modified
+37 -10
file modified
+2 -0