• Jaroslav Sevcik's avatar
    [profiler] Fix heap iteration to ignore deoptimized code objects. · 6aa9f43d
    Jaroslav Sevcik authored
    When starting profiling, we iterate the heap to find all existing code
    objects and the associated functions.
    
    The iteration tried to log the function's code if either the closure's
    code was optimized-but-not-deoptimized or if the optimized code in its
    feedback vector was optimized-but-not-deoptimized.
    
    That caused some trouble if the function's code was deoptimized but
    we had a valid optimized code in the feedback vector. In that case
    we would log the deoptimized code object from the closure, which 
    would later crash when trying to access the deoptimization information
    (which we clear on deoptimization).
    
    This CL just fixes the iteration so that we do not crash. A better fix
    might be to log the function's code object if not deoptimized *and*
    the code object in type feedback vector if not not deoptimized. Or
    perhaps iterate optimized code objects and log those that have
    deoptimization information.
    
    Bug: chromium:763073
    Change-Id: Iddee6a1c8b0fe332186ef7af2f3751c8828434b1
    Reviewed-on: https://chromium-review.googlesource.com/709116Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48437}
    6aa9f43d
log.cc 61 KB