Ignore:
Timestamp:
Feb 4, 2016, 9:24:43 PM (9 years ago)
Author:
[email protected]
Message:

Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler
https://bugs.webkit.org/show_bug.cgi?id=153500
<rdar://problem/24352458>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-02-04
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Be more explicit about enabling legacy profiling.

  • jsc.cpp:
  • runtime/Executable.cpp:

(JSC::ScriptExecutable::newCodeBlockFor):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::hasLegacyProfiler):
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock):
(JSC::JSGlobalObject::createModuleProgramCodeBlock):
(JSC::JSGlobalObject::hasProfiler): Deleted.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::supportsLegacyProfiling):
(JSC::JSGlobalObject::supportsProfiling): Deleted.

Source/WebCore:

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::supportsLegacyProfiling):
(WebCore::JSDOMWindowBase::supportsRichSourceInfo):
(WebCore::JSDOMWindowBase::supportsProfiling): Deleted.

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

(WebCore::JSWorkerGlobalScopeBase::supportsLegacyProfiling):
(WebCore::JSWorkerGlobalScopeBase::supportsProfiling): Deleted.

  • bindings/js/JSWorkerGlobalScopeBase.h:
  • inspector/InspectorController.h:
  • inspector/InspectorController.cpp:

(WebCore::InspectorController::legacyProfilerEnabled):
(WebCore::InspectorController::setLegacyProfilerEnabled):
Be more explicit about enabling legacy profiling.

  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): Deleted.
TimelineAgent doesn't need to recompile if using the sampling profiler.
This breaks console.profile, but console.profile should move to using
the sampling profiler as well.

(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
(WebCore::startProfiling): Deleted.
(WebCore::stopProfiling): Deleted.
Inlined the use once static functions.

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::profile):
(WebCore::PageConsoleClient::profileEnd):
Added FIXMEs for improving console.profile and profileEnd.

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setLegacyJavaScriptProfilingEnabled):
(WebCore::Internals::setJavaScriptProfilingEnabled): Deleted.

  • testing/Internals.h:
  • testing/Internals.idl:

Be more explicit about enabling legacy profiling.

Source/WebKit/win:

(WebInspector::isJavaScriptProfilingEnabled):
(WebInspector::setJavaScriptProfilingEnabled):
Switch to the new API names.

LayoutTests:

  • fast/profiler/*.html

Be more explicit about enabling legacy profiling.

  • inspector/sampling-profiler/eval-source-url.html

Remove an inner loop that was causing tail call optimizations
to eliminate the sourceURL we were expecting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r196001 r196165  
    142142    AllowsAccessFromFunctionPtr allowsAccessFrom;
    143143
    144     typedef bool (*SupportsProfilingFunctionPtr)(const JSGlobalObject*);
    145     SupportsProfilingFunctionPtr supportsProfiling;
     144    typedef bool (*SupportsLegacyProfilingFunctionPtr)(const JSGlobalObject*);
     145    SupportsLegacyProfilingFunctionPtr supportsLegacyProfiling;
    146146
    147147    typedef bool (*SupportsRichSourceInfoFunctionPtr)(const JSGlobalObject*);
     
    362362
    363363    bool hasDebugger() const { return m_debugger; }
    364     bool hasProfiler() const;
     364    bool hasLegacyProfiler() const;
    365365    const RuntimeFlags& runtimeFlags() const { return m_runtimeFlags; }
    366366
     
    622622
    623623    static bool allowsAccessFrom(const JSGlobalObject*, ExecState*) { return true; }
    624     static bool supportsProfiling(const JSGlobalObject*) { return false; }
     624    static bool supportsLegacyProfiling(const JSGlobalObject*) { return false; }
    625625    static bool supportsRichSourceInfo(const JSGlobalObject*) { return true; }
    626626
Note: See TracChangeset for help on using the changeset viewer.