Changeset 195799 in webkit
- Timestamp:
- Jan 28, 2016 7:46:16 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 62 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r195796 r195799 1 2016-01-28 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler 4 https://bugs.webkit.org/show_bug.cgi?id=153500 5 <rdar://problem/24352458> 6 7 Reviewed by Timothy Hatcher. 8 9 * fast/profiler/*.html 10 Be more explicit about enabling legacy profiling. 11 12 * inspector/sampling-profiler/eval-source-url.html 13 Remove an inner loop that was causing tail call optimizations 14 to eliminate the sourceURL we were expecting. 15 1 16 2016-01-28 Brady Eidson <beidson@apple.com> 2 17 -
trunk/LayoutTests/fast/profiler/anonymous-event-handler.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/anonymous-function-called-from-different-contexts.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/anonymous-function-calls-built-in-functions.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/anonymous-function-calls-eval.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/anonymous-functions-with-display-names.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function anonymousFunctionGenerator(iterations) -
trunk/LayoutTests/fast/profiler/apply.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/built-in-function-calls-anonymous.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/built-in-function-calls-user-defined-function.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/call-register-leak.html
r132700 r195799 5 5 testRunner.dumpAsText(); 6 6 if (window.internals) 7 internals.set JavaScriptProfilingEnabled(true);7 internals.setLegacyJavaScriptProfilingEnabled(true); 8 8 9 9 function log(s) -
trunk/LayoutTests/fast/profiler/call.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/compare-multiple-profiles.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 var j = 0; -
trunk/LayoutTests/fast/profiler/constructor.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/dead-time.html
r132700 r195799 8 8 } 9 9 if (window.internals) 10 internals.set JavaScriptProfilingEnabled(true);10 internals.setLegacyJavaScriptProfilingEnabled(true); 11 11 12 12 function startTest() -
trunk/LayoutTests/fast/profiler/document-dot-write.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/event-handler.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/execution-context-and-eval-on-same-line.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/inline-event-handler.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/many-calls-in-the-same-scope.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/multiple-and-different-scoped-anonymous-function-calls.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/multiple-and-different-scoped-function-calls.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/multiple-anonymous-functions-called-from-the-same-function.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/multiple-frames.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/named-functions-with-display-names.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function function0() -
trunk/LayoutTests/fast/profiler/nested-anonymous-functon.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/nested-start-and-stop-profiler.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/no-execution-context.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 </script> 10 10 </head> -
trunk/LayoutTests/fast/profiler/one-execution-context.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/profile-calls-in-included-file.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/profile-with-no-title.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/profiling-from-a-nested-location.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/simple-event-call.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/simple-no-level-change.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/start-and-stop-profiler-multiple-times.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/start-and-stop-profiling-in-the-same-function.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/start-but-dont-stop-profiling.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout.html
r132700 r195799 8 8 } 9 9 if (window.internals) 10 internals.set JavaScriptProfilingEnabled(true);10 internals.setLegacyJavaScriptProfilingEnabled(true); 11 11 12 12 function startTest() -
trunk/LayoutTests/fast/profiler/stop-then-function-call.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 var j = 0; -
trunk/LayoutTests/fast/profiler/throw-exception-from-eval.html-disabled
r124410 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.settings.set JavaScriptProfilingEnabled(true);8 internals.settings.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 console.profile("Throw within an eval."); -
trunk/LayoutTests/fast/profiler/two-execution-contexts.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/user-defined-function-calls-built-in-functions.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/fast/profiler/window-dot-eval.html
r132700 r195799 6 6 testRunner.dumpAsText(); 7 7 if (window.internals) 8 internals.set JavaScriptProfilingEnabled(true);8 internals.setLegacyJavaScriptProfilingEnabled(true); 9 9 10 10 function startTest() -
trunk/LayoutTests/inspector/sampling-profiler/eval-source-url.html
r195376 r195799 22 22 23 23 function bar() { 24 for (let i = 0; i < 2; i++) 25 eval("//# sourceURL=eval.js\nfoo();"); 24 eval("//# sourceURL=eval.js\nfoo();"); 26 25 } 27 26 noInline(bar); -
trunk/Source/JavaScriptCore/ChangeLog
r195788 r195799 1 2016-01-28 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler 4 https://bugs.webkit.org/show_bug.cgi?id=153500 5 <rdar://problem/24352458> 6 7 Reviewed by Timothy Hatcher. 8 9 Be more explicit about enabling legacy profiling. 10 11 * jsc.cpp: 12 * runtime/Executable.cpp: 13 (JSC::ScriptExecutable::newCodeBlockFor): 14 * runtime/JSGlobalObject.cpp: 15 (JSC::JSGlobalObject::hasLegacyProfiler): 16 (JSC::JSGlobalObject::createProgramCodeBlock): 17 (JSC::JSGlobalObject::createEvalCodeBlock): 18 (JSC::JSGlobalObject::createModuleProgramCodeBlock): 19 (JSC::JSGlobalObject::hasProfiler): Deleted. 20 * runtime/JSGlobalObject.h: 21 (JSC::JSGlobalObject::supportsLegacyProfiling): 22 (JSC::JSGlobalObject::supportsProfiling): Deleted. 23 1 24 2016-01-28 Yusuke Suzuki <utatane.tea@gmail.com> 2 25 -
trunk/Source/JavaScriptCore/jsc.cpp
r195376 r195799 778 778 779 779 const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, nullptr, CREATE_METHOD_TABLE(GlobalObject) }; 780 const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supports Profiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, nullptr };780 const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, nullptr }; 781 781 782 782 -
trunk/Source/JavaScriptCore/runtime/Executable.cpp
r194449 r195799 298 298 ParserError error; 299 299 DebuggerMode debuggerMode = globalObject->hasDebugger() ? DebuggerOn : DebuggerOff; 300 ProfilerMode profilerMode = globalObject->has Profiler() ? ProfilerOn : ProfilerOff;300 ProfilerMode profilerMode = globalObject->hasLegacyProfiler() ? ProfilerOn : ProfilerOff; 301 301 UnlinkedFunctionCodeBlock* unlinkedCodeBlock = 302 302 executable->m_unlinkedExecutable->unlinkedCodeBlockFor( -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r195460 r195799 174 174 const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &Base::s_info, &globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) }; 175 175 176 const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supports Profiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, nullptr, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr };176 const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, nullptr, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr }; 177 177 178 178 /* Source for JSGlobalObject.lut.h … … 613 613 } 614 614 615 bool JSGlobalObject::hasProfiler() const 616 { 617 if (m_debugger && m_debugger->hasProfilingClient()) 618 return true; 619 620 return globalObjectMethodTable()->supportsProfiling(this); 615 bool JSGlobalObject::hasLegacyProfiler() const 616 { 617 return globalObjectMethodTable()->supportsLegacyProfiling(this); 621 618 } 622 619 … … 980 977 JSParserStrictMode strictMode = executable->isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict; 981 978 DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff; 982 ProfilerMode profilerMode = has Profiler() ? ProfilerOn : ProfilerOff;979 ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff; 983 980 UnlinkedProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()->getProgramCodeBlock( 984 981 vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, strictMode, … … 1001 998 JSParserStrictMode strictMode = executable->isStrictMode() ? JSParserStrictMode::Strict : JSParserStrictMode::NotStrict; 1002 999 DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff; 1003 ProfilerMode profilerMode = has Profiler() ? ProfilerOn : ProfilerOff;1000 ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff; 1004 1001 UnlinkedEvalCodeBlock* unlinkedCodeBlock = vm().codeCache()->getEvalCodeBlock( 1005 1002 vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, strictMode, thisTDZMode, isArrowFunctionContext, debuggerMode, profilerMode, error, variablesUnderTDZ); … … 1020 1017 ParserError error; 1021 1018 DebuggerMode debuggerMode = hasDebugger() ? DebuggerOn : DebuggerOff; 1022 ProfilerMode profilerMode = has Profiler() ? ProfilerOn : ProfilerOff;1019 ProfilerMode profilerMode = hasLegacyProfiler() ? ProfilerOn : ProfilerOff; 1023 1020 UnlinkedModuleProgramCodeBlock* unlinkedCodeBlock = vm().codeCache()->getModuleProgramCodeBlock( 1024 1021 vm(), executable, executable->source(), JSParserBuiltinMode::NotBuiltin, debuggerMode, profilerMode, error); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r194869 r195799 142 142 AllowsAccessFromFunctionPtr allowsAccessFrom; 143 143 144 typedef bool (*Supports ProfilingFunctionPtr)(const JSGlobalObject*);145 Supports ProfilingFunctionPtr supportsProfiling;144 typedef bool (*SupportsLegacyProfilingFunctionPtr)(const JSGlobalObject*); 145 SupportsLegacyProfilingFunctionPtr supportsLegacyProfiling; 146 146 147 147 typedef bool (*SupportsRichSourceInfoFunctionPtr)(const JSGlobalObject*); … … 361 361 362 362 bool hasDebugger() const { return m_debugger; } 363 bool has Profiler() const;363 bool hasLegacyProfiler() const; 364 364 const RuntimeFlags& runtimeFlags() const { return m_runtimeFlags; } 365 365 … … 620 620 621 621 static bool allowsAccessFrom(const JSGlobalObject*, ExecState*) { return true; } 622 static bool supports Profiling(const JSGlobalObject*) { return false; }622 static bool supportsLegacyProfiling(const JSGlobalObject*) { return false; } 623 623 static bool supportsRichSourceInfo(const JSGlobalObject*) { return true; } 624 624 -
trunk/Source/WebCore/ChangeLog
r195798 r195799 1 2016-01-28 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler 4 https://bugs.webkit.org/show_bug.cgi?id=153500 5 <rdar://problem/24352458> 6 7 Reviewed by Timothy Hatcher. 8 9 * bindings/js/JSDOMWindowBase.cpp: 10 (WebCore::JSDOMWindowBase::supportsLegacyProfiling): 11 (WebCore::JSDOMWindowBase::supportsRichSourceInfo): 12 (WebCore::JSDOMWindowBase::supportsProfiling): Deleted. 13 * bindings/js/JSDOMWindowBase.h: 14 * bindings/js/JSWorkerGlobalScopeBase.cpp: 15 (WebCore::JSWorkerGlobalScopeBase::supportsLegacyProfiling): 16 (WebCore::JSWorkerGlobalScopeBase::supportsProfiling): Deleted. 17 * bindings/js/JSWorkerGlobalScopeBase.h: 18 * inspector/InspectorController.h: 19 * inspector/InspectorController.cpp: 20 (WebCore::InspectorController::legacyProfilerEnabled): 21 (WebCore::InspectorController::setLegacyProfilerEnabled): 22 Be more explicit about enabling legacy profiling. 23 24 * inspector/InspectorTimelineAgent.cpp: 25 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend): 26 (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): Deleted. 27 TimelineAgent doesn't need to recompile if using the sampling profiler. 28 This breaks console.profile, but console.profile should move to using 29 the sampling profiler as well. 30 31 (WebCore::InspectorTimelineAgent::startFromConsole): 32 (WebCore::InspectorTimelineAgent::stopFromConsole): 33 (WebCore::startProfiling): Deleted. 34 (WebCore::stopProfiling): Deleted. 35 Inlined the use once static functions. 36 37 * page/PageConsoleClient.cpp: 38 (WebCore::PageConsoleClient::profile): 39 (WebCore::PageConsoleClient::profileEnd): 40 Added FIXMEs for improving console.profile and profileEnd. 41 42 * testing/Internals.cpp: 43 (WebCore::Internals::resetToConsistentState): 44 (WebCore::Internals::setLegacyJavaScriptProfilingEnabled): 45 (WebCore::Internals::setJavaScriptProfilingEnabled): Deleted. 46 * testing/Internals.h: 47 * testing/Internals.idl: 48 Be more explicit about enabling legacy profiling. 49 1 50 2016-01-28 Chris Dumez <cdumez@apple.com> 2 51 -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp
r194960 r195799 64 64 const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) }; 65 65 66 const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supports Profiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, &moduleLoaderEvaluate };66 const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, &moduleLoaderEvaluate }; 67 67 68 68 JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell) … … 116 116 } 117 117 118 bool JSDOMWindowBase::supports Profiling(const JSGlobalObject* object)118 bool JSDOMWindowBase::supportsLegacyProfiling(const JSGlobalObject* object) 119 119 { 120 120 const JSDOMWindowBase* thisObject = static_cast<const JSDOMWindowBase*>(object); … … 127 127 return false; 128 128 129 return page->inspectorController(). profilerEnabled();129 return page->inspectorController().legacyProfilerEnabled(); 130 130 } 131 131 … … 143 143 bool enabled = page->inspectorController().enabled(); 144 144 ASSERT(enabled || !thisObject->debugger()); 145 ASSERT(enabled || !supports Profiling(thisObject));145 ASSERT(enabled || !supportsLegacyProfiling(thisObject)); 146 146 return enabled; 147 147 } -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h
r194960 r195799 61 61 static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable; 62 62 63 static bool supports Profiling(const JSC::JSGlobalObject*);63 static bool supportsLegacyProfiling(const JSC::JSGlobalObject*); 64 64 static bool supportsRichSourceInfo(const JSC::JSGlobalObject*); 65 65 static bool shouldInterruptScript(const JSC::JSGlobalObject*); -
trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
r193366 r195799 44 44 const ClassInfo JSWorkerGlobalScopeBase::s_info = { "WorkerGlobalScope", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSWorkerGlobalScopeBase) }; 45 45 46 const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supports Profiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr };46 const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr }; 47 47 48 48 JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase(JSC::VM& vm, JSC::Structure* structure, PassRefPtr<WorkerGlobalScope> impl) … … 73 73 } 74 74 75 bool JSWorkerGlobalScopeBase::supports Profiling(const JSGlobalObject* object)75 bool JSWorkerGlobalScopeBase::supportsLegacyProfiling(const JSGlobalObject* object) 76 76 { 77 return JSGlobalObject::supports Profiling(object);77 return JSGlobalObject::supportsLegacyProfiling(object); 78 78 } 79 79 -
trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h
r191887 r195799 54 54 55 55 static bool allowsAccessFrom(const JSC::JSGlobalObject*, JSC::ExecState*); 56 static bool supports Profiling(const JSC::JSGlobalObject*);56 static bool supportsLegacyProfiling(const JSC::JSGlobalObject*); 57 57 static bool supportsRichSourceInfo(const JSC::JSGlobalObject*); 58 58 static bool shouldInterruptScript(const JSC::JSGlobalObject*); -
trunk/Source/WebCore/inspector/InspectorController.cpp
r194496 r195799 404 404 } 405 405 406 bool InspectorController::profilerEnabled() const 407 { 408 return m_instrumentingAgents->persistentInspectorTimelineAgent(); 409 } 410 411 void InspectorController::setProfilerEnabled(bool enable) 412 { 413 ErrorString unused; 414 415 if (enable) { 416 m_instrumentingAgents->setPersistentInspectorTimelineAgent(m_timelineAgent); 417 m_timelineAgent->start(unused); 418 } else { 419 m_instrumentingAgents->setPersistentInspectorTimelineAgent(nullptr); 420 m_timelineAgent->stop(unused); 421 } 406 bool InspectorController::legacyProfilerEnabled() const 407 { 408 return m_legacyProfilerEnabled; 409 } 410 411 void InspectorController::setLegacyProfilerEnabled(bool enable) 412 { 413 m_legacyProfilerEnabled = enable; 414 415 m_instrumentingAgents->setPersistentInspectorTimelineAgent(enable ? m_timelineAgent : nullptr); 416 m_scriptDebugServer.recompileAllJSFunctions(); 422 417 } 423 418 -
trunk/Source/WebCore/inspector/InspectorController.h
r194242 r195799 112 112 WEBCORE_EXPORT void evaluateForTestInFrontend(const String& script); 113 113 114 WEBCORE_EXPORT bool profilerEnabled() const;115 WEBCORE_EXPORT void set ProfilerEnabled(bool);114 WEBCORE_EXPORT bool legacyProfilerEnabled() const; 115 WEBCORE_EXPORT void setLegacyProfilerEnabled(bool); 116 116 117 117 InspectorClient* inspectorClient() const { return m_inspectorClient; } … … 152 152 bool m_isUnderTest { false }; 153 153 bool m_isAutomaticInspection { false }; 154 bool m_legacyProfilerEnabled { false }; 154 155 }; 155 156 -
trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp
r194871 r195799 85 85 { 86 86 m_instrumentingAgents.setPersistentInspectorTimelineAgent(this); 87 88 // Recompile to include profiling information. 89 // FIXME: This doesn't seem like the most appropriate place. 90 m_environment.scriptDebugServer().recompileAllJSFunctions(); 91 } 92 93 void InspectorTimelineAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason reason) 87 } 88 89 void InspectorTimelineAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason) 94 90 { 95 91 m_instrumentingAgents.setPersistentInspectorTimelineAgent(nullptr); 96 97 if (reason != Inspector::DisconnectReason::InspectedTargetDestroyed)98 m_environment.scriptDebugServer().recompileAllJSFunctions();99 92 100 93 ErrorString unused; … … 204 197 } 205 198 206 static inline void startProfiling(JSC::ExecState* exec, const String& title, RefPtr<Stopwatch>&& stopwatch)207 {208 JSC::LegacyProfiler::profiler()->startProfiling(exec, title, WTFMove(stopwatch));209 }210 211 static inline RefPtr<JSC::Profile> stopProfiling(JSC::ExecState* exec, const String& title)212 {213 return JSC::LegacyProfiler::profiler()->stopProfiling(exec, title);214 }215 216 199 void InspectorTimelineAgent::startFromConsole(JSC::ExecState* exec, const String &title) 217 200 { 201 // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler 202 218 203 // Only allow recording of a profile if it is anonymous (empty title) or does not match 219 204 // the title of an already recording profile. … … 230 215 internalStart(); 231 216 232 startProfiling(exec, title, m_environment.executionStopwatch());217 JSC::LegacyProfiler::profiler()->startProfiling(exec, title, m_environment.executionStopwatch()); 233 218 234 219 m_pendingConsoleProfileRecords.append(createRecordEntry(TimelineRecordFactory::createConsoleProfileData(title), TimelineRecordType::ConsoleProfile, true, frameFromExecState(exec))); … … 237 222 RefPtr<JSC::Profile> InspectorTimelineAgent::stopFromConsole(JSC::ExecState* exec, const String& title) 238 223 { 224 // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler 225 239 226 // Stop profiles in reverse order. If the title is empty, then stop the last profile. 240 227 // Otherwise, match the title of the profile to stop. … … 246 233 247 234 if (title.isEmpty() || recordTitle == title) { 248 RefPtr<JSC::Profile> profile = stopProfiling(exec, title);235 RefPtr<JSC::Profile> profile = JSC::LegacyProfiler::profiler()->stopProfiling(exec, title); 249 236 if (profile) 250 237 TimelineRecordFactory::appendProfile(record.data.get(), profile.copyRef()); -
trunk/Source/WebCore/page/PageConsoleClient.cpp
r194496 r195799 185 185 void PageConsoleClient::profile(JSC::ExecState* exec, const String& title) 186 186 { 187 // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler 187 188 InspectorInstrumentation::startProfiling(m_page, exec, title); 188 189 } … … 190 191 void PageConsoleClient::profileEnd(JSC::ExecState* exec, const String& title) 191 192 { 193 // FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler 192 194 if (RefPtr<JSC::Profile> profile = InspectorInstrumentation::stopProfiling(m_page, exec, title)) 193 195 m_profiles.append(WTFMove(profile)); -
trunk/Source/WebCore/testing/Internals.cpp
r195685 r195799 373 373 WebCore::overrideUserPreferredLanguages(Vector<String>()); 374 374 WebCore::Settings::setUsesOverlayScrollbars(false); 375 page->inspectorController().set ProfilerEnabled(false);375 page->inspectorController().setLegacyProfilerEnabled(false); 376 376 #if ENABLE(VIDEO_TRACK) 377 377 page->group().captionPreferences()->setCaptionsStyleSheetOverride(emptyString()); … … 1840 1840 } 1841 1841 1842 void Internals::set JavaScriptProfilingEnabled(bool enabled, ExceptionCode& ec)1842 void Internals::setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode& ec) 1843 1843 { 1844 1844 Page* page = contextDocument()->frame()->page(); … … 1848 1848 } 1849 1849 1850 page->inspectorController().set ProfilerEnabled(enabled);1850 page->inspectorController().setLegacyProfilerEnabled(enabled); 1851 1851 } 1852 1852 -
trunk/Source/WebCore/testing/Internals.h
r195685 r195799 279 279 RefPtr<DOMWindow> openDummyInspectorFrontend(const String& url); 280 280 void closeDummyInspectorFrontend(); 281 void set JavaScriptProfilingEnabled(bool enabled, ExceptionCode&);281 void setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode&); 282 282 void setInspectorIsUnderTest(bool isUnderTest, ExceptionCode&); 283 283 -
trunk/Source/WebCore/testing/Internals.idl
r195685 r195799 264 264 DOMWindow openDummyInspectorFrontend(DOMString url); 265 265 void closeDummyInspectorFrontend(); 266 [RaisesException] void set JavaScriptProfilingEnabled(boolean creates);266 [RaisesException] void setLegacyJavaScriptProfilingEnabled(boolean enabled); 267 267 [RaisesException] void setInspectorIsUnderTest(boolean isUnderTest); 268 268
Note: See TracChangeset
for help on using the changeset viewer.