Changeset 173198 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Sep 2, 2014, 8:17:47 PM (11 years ago)
Author:
Brian Burg
Message:

Web Inspector: remove ProfilerAgent and legacy profiler files in the frontend
https://bugs.webkit.org/show_bug.cgi?id=136462

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

It's not used by the frontend anymore.

  • inspector/JSConsoleClient.cpp:

(Inspector::JSConsoleClient::JSConsoleClient): Stub out console.profile/profileEnd
methods since they didn't work for JSContexts anyway.
(Inspector::JSConsoleClient::profile):
(Inspector::JSConsoleClient::profileEnd):

  • inspector/JSConsoleClient.h:
  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):

  • inspector/agents/InspectorProfilerAgent.cpp: Removed.
  • inspector/agents/InspectorProfilerAgent.h: Removed.
  • inspector/agents/JSGlobalObjectProfilerAgent.cpp: Removed.
  • inspector/agents/JSGlobalObjectProfilerAgent.h: Removed.
  • inspector/protocol/Profiler.json: Removed.

Source/WebCore:

It's not used by the frontend anymore.

No new tests, no behavior changed.

  • CMakeLists.txt:
  • ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Removed.
  • WebCore.order:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorAllInOne.cpp:
  • inspector/InspectorController.cpp:

(WebCore::InspectorController::InspectorController):

  • inspector/InspectorController.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didCommitLoadImpl):

  • inspector/InstrumentingAgents.cpp:

(WebCore::InstrumentingAgents::InstrumentingAgents):
(WebCore::InstrumentingAgents::reset):

  • inspector/InstrumentingAgents.h:

(WebCore::InstrumentingAgents::inspectorProfilerAgent): Deleted.
(WebCore::InstrumentingAgents::setInspectorProfilerAgent): Deleted.

  • inspector/PageProfilerAgent.cpp: Removed.
  • inspector/PageProfilerAgent.h: Removed.
  • inspector/TimelineRecordFactory.cpp: Moved these builders to their only callsite.

(WebCore::buildInspectorObject):
(WebCore::buildProfileInspectorObject):
(WebCore::TimelineRecordFactory::appendProfile):

  • inspector/WebProfilerAgent.cpp: Removed.
  • inspector/WebProfilerAgent.h: Removed.
  • inspector/WorkerInspectorController.cpp:

(WebCore::WorkerInspectorController::WorkerInspectorController):

  • inspector/WorkerProfilerAgent.cpp: Removed.
  • inspector/WorkerProfilerAgent.h: Removed.
  • inspector/protocol/Timeline.json:

Source/WebInspectorUI:

The legacy profiler manager didn't do anything, and its views and models
have been superseded by new views and models based on the Timeline classes.

  • .eslintrc:
  • UserInterface/Base/Main.js:

(WebInspector.loaded):
(WebInspector.openURL): Remove profile URL handling code.

  • UserInterface/Controllers/LegacyProfileManager.js: Removed.
  • UserInterface/Main.html:
  • UserInterface/Protocol/ConsoleObserver.js:

(WebInspector.ConsoleObserver.prototype.messageAdded):

  • UserInterface/Protocol/InspectorFrontendAPI.js:

(InspectorFrontendAPI.isProfilingJavaScript): Deleted.
(InspectorFrontendAPI.startProfilingJavaScript): Deleted.
(InspectorFrontendAPI.stopProfilingJavaScript): Deleted.

  • UserInterface/Protocol/LegacyProfilerObserver.js: Removed.
  • UserInterface/Views/LegacyBottomUpProfileDataGridTree.js: Removed.
  • UserInterface/Views/LegacyJavaScriptProfileObject.js: Removed.
  • UserInterface/Views/LegacyJavaScriptProfileType.js: Removed.
  • UserInterface/Views/LegacyJavaScriptProfileView.css: Removed.
  • UserInterface/Views/LegacyJavaScriptProfileView.js: Removed.
  • UserInterface/Views/LegacyProfileDataGridTree.js: Removed.
  • UserInterface/Views/LegacyProfileObject.js: Removed.
  • UserInterface/Views/LegacyProfileType.js: Removed.
  • UserInterface/Views/LegacyProfileView.css: Removed.
  • UserInterface/Views/LegacyProfileView.js: Removed.
  • UserInterface/Views/LegacyTopDownProfileDataGridTree.js: Removed.
Location:
trunk/Source/JavaScriptCore
Files:
5 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r173164 r173198  
    301301    inspector/agents/InspectorConsoleAgent.cpp
    302302    inspector/agents/InspectorDebuggerAgent.cpp
    303     inspector/agents/InspectorProfilerAgent.cpp
    304303    inspector/agents/InspectorRuntimeAgent.cpp
    305304    inspector/agents/JSGlobalObjectConsoleAgent.cpp
    306305    inspector/agents/JSGlobalObjectDebuggerAgent.cpp
    307     inspector/agents/JSGlobalObjectProfilerAgent.cpp
    308306    inspector/agents/JSGlobalObjectRuntimeAgent.cpp
    309307
     
    957955    ${JAVASCRIPTCORE_DIR}/inspector/protocol/GenericTypes.json
    958956    ${JAVASCRIPTCORE_DIR}/inspector/protocol/InspectorDomain.json
    959     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Profiler.json
    960957    ${JAVASCRIPTCORE_DIR}/inspector/protocol/Runtime.json
    961958)
  • trunk/Source/JavaScriptCore/ChangeLog

    r173188 r173198  
     12014-09-02  Brian J. Burg  <[email protected]>
     2
     3        Web Inspector: remove ProfilerAgent and legacy profiler files in the frontend
     4        https://bugs.webkit.org/show_bug.cgi?id=136462
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        It's not used by the frontend anymore.
     9
     10        * CMakeLists.txt:
     11        * DerivedSources.make:
     12        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
     13        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
     14        * JavaScriptCore.xcodeproj/project.pbxproj:
     15
     16        * inspector/JSConsoleClient.cpp:
     17        (Inspector::JSConsoleClient::JSConsoleClient): Stub out console.profile/profileEnd
     18        methods since they didn't work for JSContexts anyway.
     19        (Inspector::JSConsoleClient::profile):
     20        (Inspector::JSConsoleClient::profileEnd):
     21        * inspector/JSConsoleClient.h:
     22
     23        * inspector/JSGlobalObjectInspectorController.cpp:
     24        (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
     25        * inspector/agents/InspectorProfilerAgent.cpp: Removed.
     26        * inspector/agents/InspectorProfilerAgent.h: Removed.
     27        * inspector/agents/JSGlobalObjectProfilerAgent.cpp: Removed.
     28        * inspector/agents/JSGlobalObjectProfilerAgent.h: Removed.
     29        * inspector/protocol/Profiler.json: Removed.
     30
    1312014-09-02  Andreas Kling  <[email protected]>
    232
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r172930 r173198  
    118118    $(JavaScriptCore)/inspector/protocol/GenericTypes.json \
    119119    $(JavaScriptCore)/inspector/protocol/InspectorDomain.json \
    120     $(JavaScriptCore)/inspector/protocol/Profiler.json \
    121120    $(JavaScriptCore)/inspector/protocol/Runtime.json \
    122121#
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj

    r173072 r173198  
    575575    <ClCompile Include="..\inspector\agents\InspectorConsoleAgent.cpp" />
    576576    <ClCompile Include="..\inspector\agents\InspectorDebuggerAgent.cpp" />
    577     <ClCompile Include="..\inspector\agents\InspectorProfilerAgent.cpp" />
    578577    <ClCompile Include="..\inspector\agents\InspectorRuntimeAgent.cpp" />
    579578    <ClCompile Include="..\interpreter\AbstractPC.cpp" />
     
    12791278    <ClInclude Include="..\inspector\agents\InspectorConsoleAgent.h" />
    12801279    <ClInclude Include="..\inspector\agents\InspectorDebuggerAgent.h" />
    1281     <ClInclude Include="..\inspector\agents\InspectorProfilerAgent.h" />
    12821280    <ClInclude Include="..\inspector\agents\InspectorRuntimeAgent.h" />
    12831281    <ClInclude Include="..\interpreter\AbstractPC.h" />
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters

    r172930 r173198  
    343343      <Filter>inspector</Filter>
    344344    </ClCompile>
    345     <ClCompile Include="..\inspector\agents\InspectorProfilerAgent.cpp">
    346       <Filter>inspector</Filter>
    347     </ClCompile>
    348345    <ClCompile Include="..\inspector\agents\InspectorRuntimeAgent.cpp">
    349346      <Filter>inspector</Filter>
     
    21912188    </ClInclude>
    21922189    <ClInclude Include="..\inspector\agents\InspectorDebuggerAgent.h">
    2193       <Filter>inspector</Filter>
    2194     </ClInclude>
    2195     <ClInclude Include="..\inspector\agents\InspectorProfilerAgent.h">
    21962190      <Filter>inspector</Filter>
    21972191    </ClInclude>
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r173072 r173198  
    834834                1A28D4A8177B71C80007FA3C /* JSStringRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A28D4A7177B71C80007FA3C /* JSStringRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    835835                1ACF7377171CA6FB00C9BB1E /* Weak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACF7376171CA6FB00C9BB1E /* Weak.cpp */; };
    836                 1CAA9A1E18F4997F000A369D /* InspectorProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CAA9A1C18F4997F000A369D /* InspectorProfilerAgent.cpp */; };
    837                 1CAA9A1F18F4997F000A369D /* InspectorProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CAA9A1D18F4997F000A369D /* InspectorProfilerAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
    838                 1CAA9A2218F4A220000A369D /* JSGlobalObjectProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CAA9A2018F4A220000A369D /* JSGlobalObjectProfilerAgent.cpp */; };
    839                 1CAA9A2318F4A220000A369D /* JSGlobalObjectProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CAA9A2118F4A220000A369D /* JSGlobalObjectProfilerAgent.h */; };
    840836                2600B5A6152BAAA70091EE5F /* JSStringJoiner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2600B5A4152BAAA70091EE5F /* JSStringJoiner.cpp */; };
    841837                2600B5A7152BAAA70091EE5F /* JSStringJoiner.h in Headers */ = {isa = PBXBuildFile; fileRef = 2600B5A5152BAAA70091EE5F /* JSStringJoiner.h */; };
     
    27202716                1CAA8B4A0D32C39A0041BCFF /* JavaScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScript.h; sourceTree = "<group>"; };
    27212717                1CAA8B4B0D32C39A0041BCFF /* JavaScriptCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptCore.h; sourceTree = "<group>"; };
    2722                 1CAA9A1C18F4997F000A369D /* InspectorProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorProfilerAgent.cpp; sourceTree = "<group>"; };
    2723                 1CAA9A1D18F4997F000A369D /* InspectorProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorProfilerAgent.h; sourceTree = "<group>"; };
    2724                 1CAA9A2018F4A220000A369D /* JSGlobalObjectProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectProfilerAgent.cpp; sourceTree = "<group>"; };
    2725                 1CAA9A2118F4A220000A369D /* JSGlobalObjectProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectProfilerAgent.h; sourceTree = "<group>"; };
    27262718                2600B5A4152BAAA70091EE5F /* JSStringJoiner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStringJoiner.cpp; sourceTree = "<group>"; };
    27272719                2600B5A5152BAAA70091EE5F /* JSStringJoiner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringJoiner.h; sourceTree = "<group>"; };
     
    53215313                                A57D23E31890CEBF0031C7FA /* InspectorDebuggerAgent.cpp */,
    53225314                                A57D23E41890CEBF0031C7FA /* InspectorDebuggerAgent.h */,
    5323                                 1CAA9A1C18F4997F000A369D /* InspectorProfilerAgent.cpp */,
    5324                                 1CAA9A1D18F4997F000A369D /* InspectorProfilerAgent.h */,
    53255315                                A50E4B5D18809DD50068A46D /* InspectorRuntimeAgent.cpp */,
    53265316                                A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */,
     
    53295319                                A57D23E71891B0770031C7FA /* JSGlobalObjectDebuggerAgent.cpp */,
    53305320                                A57D23E81891B0770031C7FA /* JSGlobalObjectDebuggerAgent.h */,
    5331                                 1CAA9A2018F4A220000A369D /* JSGlobalObjectProfilerAgent.cpp */,
    5332                                 1CAA9A2118F4A220000A369D /* JSGlobalObjectProfilerAgent.h */,
    53335321                                A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */,
    53345322                                A50E4B6018809DD50068A46D /* JSGlobalObjectRuntimeAgent.h */,
     
    62106198                                BC18C4170E16F5CD00B34460 /* JSArray.h in Headers */,
    62116199                                0F2B66E317B6B5AB00A7AE3F /* JSArrayBuffer.h in Headers */,
    6212                                 1CAA9A2318F4A220000A369D /* JSGlobalObjectProfilerAgent.h in Headers */,
    62136200                                0F2B66E517B6B5AB00A7AE3F /* JSArrayBufferConstructor.h in Headers */,
    62146201                                0F2B66E717B6B5AB00A7AE3F /* JSArrayBufferPrototype.h in Headers */,
     
    62386225                                0F7576D318E1FEE9002EF4CD /* AccessorCallJITStubRoutine.h in Headers */,
    62396226                                0F2B66EC17B6B5AB00A7AE3F /* JSDataView.h in Headers */,
    6240                                 1CAA9A1F18F4997F000A369D /* InspectorProfilerAgent.h in Headers */,
    62416227                                0F2B66EE17B6B5AB00A7AE3F /* JSDataViewPrototype.h in Headers */,
    62426228                                978801411471AD920041B016 /* JSDateMath.h in Headers */,
     
    73997385                                0F6B1CC31862C47800845D97 /* FTLRegisterAtOffset.cpp in Sources */,
    74007386                                0FCEFAAB1804C13E00472CE4 /* FTLSaveRestore.cpp in Sources */,
    7401                                 1CAA9A2218F4A220000A369D /* JSGlobalObjectProfilerAgent.cpp in Sources */,
    74027387                                0F25F1B1181635F300522F39 /* FTLSlowPathCall.cpp in Sources */,
    74037388                                0F25F1B3181635F300522F39 /* FTLSlowPathCallKey.cpp in Sources */,
     
    76237608                                0F13912916771C33009CCB07 /* ProfilerBytecodeSequence.cpp in Sources */,
    76247609                                0FF729AF166AD35C000F5BA3 /* ProfilerCompilation.cpp in Sources */,
    7625                                 1CAA9A1E18F4997F000A369D /* InspectorProfilerAgent.cpp in Sources */,
    76267610                                0FF729B0166AD35C000F5BA3 /* ProfilerCompilationKind.cpp in Sources */,
    76277611                                0FF729B1166AD35C000F5BA3 /* ProfilerCompiledBytecode.cpp in Sources */,
  • trunk/Source/JavaScriptCore/inspector/JSConsoleClient.cpp

    r167530 r173198  
    3030
    3131#include "InspectorConsoleAgent.h"
    32 #include "InspectorProfilerAgent.h"
    3332#include "ScriptArguments.h"
    3433#include "ScriptCallStack.h"
     
    6766}
    6867
    69 JSConsoleClient::JSConsoleClient(InspectorConsoleAgent* consoleAgent, InspectorProfilerAgent* profilerAgent)
     68JSConsoleClient::JSConsoleClient(InspectorConsoleAgent* consoleAgent)
    7069    : ConsoleClient()
    7170    , m_consoleAgent(consoleAgent)
    72     , m_profilerAgent(profilerAgent)
    7371{
    7472    static std::once_flag initializeLogging;
     
    9593}
    9694
    97 void JSConsoleClient::profile(JSC::ExecState* exec, const String& title)
     95void JSConsoleClient::profile(JSC::ExecState*, const String&)
    9896{
    99     if (!m_profilerAgent->enabled())
    100         return;
    101 
    102     String resolvedTitle = m_profilerAgent->startProfiling(title);
    103 
    104     RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, 1));
    105     m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, MessageType::Profile, MessageLevel::Debug, resolvedTitle, callStack);
     97    // FIXME: support |console.profile| for JSContexts. <https://webkit.org/b/136466>
    10698}
    10799
    108 void JSConsoleClient::profileEnd(JSC::ExecState* exec, const String& title)
     100void JSConsoleClient::profileEnd(JSC::ExecState*, const String&)
    109101{
    110     if (!m_profilerAgent->enabled())
    111         return;
    112 
    113     RefPtr<JSC::Profile> profile = m_profilerAgent->stopProfiling(title);
    114     if (!profile)
    115         return;
    116 
    117     RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(exec, 1));
    118     String message = makeString(profile->title(), '#', String::number(profile->uid()));
    119     m_consoleAgent->addMessageToConsole(MessageSource::ConsoleAPI, MessageType::Profile, MessageLevel::Debug, message, callStack);
     102    // FIXME: support |console.profile| for JSContexts. <https://webkit.org/b/136466>
    120103}
    121104
  • trunk/Source/JavaScriptCore/inspector/JSConsoleClient.h

    r167811 r173198  
    3232
    3333class InspectorConsoleAgent;
    34 class InspectorProfilerAgent;
    3534
    3635class JSConsoleClient final : public JSC::ConsoleClient {
    3736    WTF_MAKE_FAST_ALLOCATED;
    3837public:
    39     explicit JSConsoleClient(InspectorConsoleAgent*, InspectorProfilerAgent*);
     38    explicit JSConsoleClient(InspectorConsoleAgent*);
    4039    virtual ~JSConsoleClient() { }
    4140
     
    5857
    5958    InspectorConsoleAgent* m_consoleAgent;
    60     InspectorProfilerAgent* m_profilerAgent;
    6159};
    6260
  • trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp

    r170774 r173198  
    4040#include "JSGlobalObjectConsoleAgent.h"
    4141#include "JSGlobalObjectDebuggerAgent.h"
    42 #include "JSGlobalObjectProfilerAgent.h"
    4342#include "JSGlobalObjectRuntimeAgent.h"
    4443#include "ScriptArguments.h"
     
    6261    auto consoleAgent = std::make_unique<JSGlobalObjectConsoleAgent>(m_injectedScriptManager.get());
    6362    auto debuggerAgent = std::make_unique<JSGlobalObjectDebuggerAgent>(m_injectedScriptManager.get(), m_globalObject, consoleAgent.get());
    64     auto profilerAgent = std::make_unique<JSGlobalObjectProfilerAgent>(m_globalObject);
    6563
    6664    m_consoleAgent = consoleAgent.get();
    67     m_consoleClient = std::make_unique<JSConsoleClient>(m_consoleAgent, profilerAgent.get());
     65    m_consoleClient = std::make_unique<JSConsoleClient>(m_consoleAgent);
    6866
    6967    runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
    70     profilerAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
    7168
    7269    m_agents.append(std::make_unique<InspectorAgent>());
Note: See TracChangeset for help on using the changeset viewer.