Web Inspector: the profiler should not accrue time to nodes while the debugger is...
authorburg@cs.washington.edu <burg@cs.washington.edu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Sep 2014 17:21:39 +0000 (17:21 +0000)
committerburg@cs.washington.edu <burg@cs.washington.edu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Sep 2014 17:21:39 +0000 (17:21 +0000)
commit1f757a0725707b4461f71fa8a55f1d75dfb9829d
treefabbdd1c438a86385fe15ae8c47d9bbc2186a97e
parent8a04981f34f8f91574f36963382627f01b73dbfc
Web Inspector: the profiler should not accrue time to nodes while the debugger is paused
https://bugs.webkit.org/show_bug.cgi?id=136352

Reviewed by Timothy Hatcher.

Hook up pause/continue events to the LegacyProfiler and any active
ProfilerGenerators. If the debugger is paused, all intervening call
entries will be created with totalTime as 0.0.

* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::handlePause):
* profiler/LegacyProfiler.cpp: Move from typedef'd callbacks to using
std::function. This allows callbacks to take different argument types.

(JSC::callFunctionForProfilesWithGroup):
(JSC::LegacyProfiler::willExecute):
(JSC::LegacyProfiler::didExecute):
(JSC::LegacyProfiler::exceptionUnwind):
(JSC::LegacyProfiler::didPause):
(JSC::LegacyProfiler::didContinue):
(JSC::dispatchFunctionToProfiles): Deleted.
* profiler/LegacyProfiler.h:
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::ProfileGenerator):
(JSC::ProfileGenerator::endCallEntry):
(JSC::ProfileGenerator::didExecute): Deleted.
* profiler/ProfileGenerator.h:
(JSC::ProfileGenerator::didPause):
(JSC::ProfileGenerator::didContinue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/ScriptDebugServer.cpp
Source/JavaScriptCore/profiler/LegacyProfiler.cpp
Source/JavaScriptCore/profiler/LegacyProfiler.h
Source/JavaScriptCore/profiler/ProfileGenerator.cpp
Source/JavaScriptCore/profiler/ProfileGenerator.h