• lpy's avatar
    Refactor CpuProfiler. · cb59fc1f
    lpy authored
    Currently CpuProfiler is a subclass of CodeEventListener, it listens code events
    from Logger, constructs and stores CodeEventsContainer. This patch is part of
    the effort to split the logic of CodeEventListener as ProfilerListener out of
    the profiling functionality logic in CpuProfiler. A ProfilerListener will listen
    to code events, construct code event to CodeEventsContainer and pass it to code
    event handler.
    
    The reason we refactor CpuProfiler is that eventually we want to move
    CpuProfiler as part of sampler library and code event listener should stay
    inside V8.
    
    Main changes:
    1. Refactored CpuProfiler into two parts, the CpuProfiler with profling
    functionality and the ProfilerListener listening to code events from Logger.
    2. Created CodeEventObserver and made CpuProfiler inherit from it.
    ProfilerListener will have a list of observers and call CodeEventHandler once a
    code event is created.
    3. Moved code entry list from CodeEntry to ProfilerListener.
    
    Minor changes:
    1. Moved static code entry as part of CodeEntry.
    2. Added ProfilerListener to Logger.
    
    BUG=v8:4789
    
    Review-Url: https://codereview.chromium.org/2053523003
    Cr-Commit-Position: refs/heads/master@{#37112}
    cb59fc1f
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
fuzzer 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...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
ignition.gyp Loading commit data...
ignition.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...