Add column number and call timing support to LegacyProfiler.
https://bugs.webkit.org/show_bug.cgi?id=127764
Reviewed by Joseph Pecoraro.
Source/JavaScriptCore:
- interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
- profiler/CallIdentifier.h:
(JSC::CallIdentifier::CallIdentifier):
(JSC::CallIdentifier::functionName):
(JSC::CallIdentifier::url):
(JSC::CallIdentifier::lineNumber):
(JSC::CallIdentifier::columnNumber):
(JSC::CallIdentifier::operator==):
(JSC::CallIdentifier::operator!=):
(JSC::CallIdentifier::Hash::hash):
(WTF::HashTraits<JSC::CallIdentifier>::constructDeletedValue):
(WTF::HashTraits<JSC::CallIdentifier>::isDeletedValue):
- profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::willExecute):
(JSC::LegacyProfiler::didExecute):
(JSC::LegacyProfiler::exceptionUnwind):
(JSC::LegacyProfiler::createCallIdentifier):
(JSC::createCallIdentifierFromFunctionImp):
- profiler/LegacyProfiler.h:
- profiler/Profile.cpp:
(JSC::Profile::Profile):
(JSC::Profile::uid):
(JSC::Profile::idleTime):
(JSC::Profile::setIdleTime):
- profiler/ProfileGenerator.cpp:
(JSC::AddParentForConsoleStartFunctor::operator()):
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::stopProfiling):
(JSC::ProfileGenerator::removeProfileStart):
(JSC::ProfileGenerator::removeProfileEnd):
- profiler/ProfileNode.cpp:
(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::stopProfiling):
(JSC::ProfileNode::endAndRecordCall):
(JSC::ProfileNode::startTimer):
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::Call::Call):
(JSC::ProfileNode::Call::startTime):
(JSC::ProfileNode::Call::setStartTime):
(JSC::ProfileNode::Call::totalTime):
(JSC::ProfileNode::Call::setTotalTime):
(JSC::ProfileNode::id):
(JSC::ProfileNode::functionName):
(JSC::ProfileNode::url):
(JSC::ProfileNode::lineNumber):
(JSC::ProfileNode::columnNumber):
(JSC::ProfileNode::calls):
(JSC::ProfileNode::lastCall):
(JSC::ProfileNode::numberOfCalls):
Source/WebCore:
- bindings/js/ScriptProfile.cpp:
(WebCore::ScriptProfile::idleTime):
(WebCore::buildInspectorObjectFor):
(WebCore::ScriptProfile::buildInspectorObject):
- bindings/js/ScriptProfile.h:
- inspector/InspectorHeapProfilerAgent.cpp:
(WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
- inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::createSnapshotHeader):
(WebCore::InspectorProfilerAgent::getCPUProfile):
- inspector/ScriptProfileNode.idl:
- inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::appendProfile):
- inspector/protocol/Profiler.json:
LayoutTests:
Update test and results to include column numbers.
- fast/profiler/anonymous-event-handler-expected.txt:
- fast/profiler/anonymous-function-called-from-different-contexts-expected.txt:
- fast/profiler/anonymous-function-calls-built-in-functions-expected.txt:
- fast/profiler/anonymous-function-calls-eval-expected.txt:
- fast/profiler/anonymous-functions-with-display-names-expected.txt:
- fast/profiler/apply-expected.txt:
- fast/profiler/built-in-function-calls-anonymous-expected.txt:
- fast/profiler/built-in-function-calls-user-defined-function-expected.txt:
- fast/profiler/call-expected.txt:
- fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope-expected.txt:
- fast/profiler/compare-multiple-profiles-expected.txt:
- fast/profiler/constructor-expected.txt:
- fast/profiler/dead-time-expected.txt:
- fast/profiler/document-dot-write-expected.txt:
- fast/profiler/event-handler-expected.txt:
- fast/profiler/execution-context-and-eval-on-same-line-expected.txt:
- fast/profiler/inline-event-handler-expected.txt:
- fast/profiler/many-calls-in-the-same-scope-expected.txt:
- fast/profiler/multiple-and-different-scoped-anonymous-function-calls-expected.txt:
- fast/profiler/multiple-and-different-scoped-function-calls-expected.txt:
- fast/profiler/multiple-anonymous-functions-called-from-the-same-function-expected.txt:
- fast/profiler/multiple-frames-expected.txt:
- fast/profiler/named-functions-with-display-names-expected.txt:
- fast/profiler/nested-anonymous-functon-expected.txt:
- fast/profiler/nested-start-and-stop-profiler-expected.txt:
- fast/profiler/one-execution-context-expected.txt:
- fast/profiler/profile-calls-in-included-file-expected.txt:
- fast/profiler/profile-with-no-title-expected.txt:
- fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting-expected.txt:
- fast/profiler/profiling-from-a-nested-location-expected.txt:
- fast/profiler/resources/profiler-test-JS-resources.js:
(printProfileNodeWithoutTime):
- fast/profiler/simple-event-call-expected.txt:
- fast/profiler/simple-no-level-change-expected.txt:
- fast/profiler/start-and-stop-profiler-multiple-times-expected.txt:
- fast/profiler/start-and-stop-profiling-in-the-same-function-expected.txt:
- fast/profiler/stop-profiling-after-setTimeout-expected.txt:
- fast/profiler/stop-then-function-call-expected.txt:
- fast/profiler/two-execution-contexts-expected.txt:
- fast/profiler/user-defined-function-calls-built-in-functions-expected.txt:
- fast/profiler/window-dot-eval-expected.txt: