• Alexei Filippov's avatar
    [cpu-profiler] Eagerly delete not used CodeEntry'es · c6c28f7a
    Alexei Filippov authored
    Currently ProfilerListener holds all the CodeEntries it ever
    created during the profiling session. It is not capable of removing
    entries corresponding to the code objects discarded by GC as there's
    no such code event.
    
    However it is sometimes possible to tell if a code object was GCed.
    Hook up to the CodeMap code entry removal and if the entry has never
    been hit by a sample we can safely delete it.
    
    As a bonus the CodeEntryInfo size has been reduced on x64, which also
    saves 8 x <number of code entries> bytes.
    
    BUG=v8:7719
    
    Change-Id: I988bc5b59f3fba07157a9f472cbcf68596fcd969
    Reviewed-on: https://chromium-review.googlesource.com/1054346Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
    Commit-Queue: Alexei Filippov <alph@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53222}
    c6c28f7a
profiler-listener.h 3.7 KB