• Anton Bikineev's avatar
    heap: Generate more GCInfo entries to avoid empty finalizers · cfd97ee1
    Anton Bikineev authored
    Before this patch, in order to support finalization of classes in a
    hierarchy, the base class must have had a destructor declared as virtual.
    This hurt sweeping time as the sweeper had to execute finalizers for
    classes that didn't really have any finalization logic. The patch adds
    support for non-virtual destructors in Oilpan that provides the basis
    for reduction of finalizers in the followup CLs.
    
    In the backend the logic remained the same for classes that have either
     - virtual Base::~Base or
     - trivial Base::~Base and trivial Derived::~Derived or
     - Base::FinalizeGarbageCollectedObject.
    The new logic is:
     - if all of the conditions above don't satisfy, separate GCInfo entries
       will be created for Derived classes.
    
    Bug: 1015427
    
    Change-Id: I99481f0508d99668558283417a15cdf0bfe1ae6f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866712
    Commit-Queue: Anton Bikineev <bikineev@chromium.org>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#707365}
    cfd97ee1
heap.h 25.6 KB