Description[Reland] Refactor CpuProfiler.
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
Committed: https://crrev.com/cb59fc1facc9b390e2c7544b4da56a4e0a9b3222
Committed: https://crrev.com/04f710ac20e30ca2d903b0853947b6660ad1e16d
Cr-Original-Commit-Position: refs/heads/master@{#37112}
Cr-Commit-Position: refs/heads/master@{#37195}
Patch Set 1 #Patch Set 2 : Move CpuProfilerManager to .cc #
Total comments: 1
Patch Set 3 : rebase #Patch Set 4 : remove cpuprofilermanager, use code event observer #Patch Set 5 #Patch Set 6 #
Total comments: 6
Patch Set 7 #Patch Set 8 : rebase #Patch Set 9 : rebase #
Total comments: 14
Patch Set 10 : address alph's comments #
Total comments: 16
Patch Set 11 #
Total comments: 10
Patch Set 12 : stop profiler listener when there's no cpu profiler #
Total comments: 14
Patch Set 13 : addressed alph's nits. #Patch Set 14 : rebase #
Messages
Total messages: 36 (12 generated)
|