• Peter Marshall's avatar
    [cpu-profiler] Clear the CodeMap after the last profile to stop leak · 73a94290
    Peter Marshall authored
    We kept the CodeMap filled with entries between profiles, even in
    kLazyLogging mode which will re-fill the CodeMap when profiling starts
    again. See the bug for more details.
    
    This fix manually clears the CodeMap after the last profile is deleted.
    We already call DisableLogging() when the last profile is stopped. At
    this point we still need the CodeMap alive because the profile object
    we expose via the API is backed by the CodeEntry objects in the CodeMap.
    Once the last profile is deleted though, we can empty the CodeMap.
    
    There is still another bug, which is that we never delete CodeEntry
    objects for deleted code, as there are no CodeDeleteEvents from the GC.
    We will work on that separately, but this fix should stop those leaks
    accumulating between profiles as we wipe the CodeMap entirely between
    profiles (at least for kLazyLogging mode). kEagerLogging mode still has
    this problem and will only be fixed by introducing CodeDelete events or
    similar.
    
    Bug: v8:11051
    Change-Id: Iab9570747d17c657e6e318d434f935af8047d05f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2491033
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70792}
    73a94290
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...