Ignore:
Timestamp:
Jan 25, 2014, 10:30:38 PM (11 years ago)
Author:
[email protected]
Message:

Remove dead code from the JSC profiler.

https://bugs.webkit.org/show_bug.cgi?id=127643

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • profiler/Profile.cpp:
  • profiler/Profile.h:
  • profiler/ProfileGenerator.cpp:

(JSC::ProfileGenerator::stopProfiling):

  • profiler/ProfileNode.cpp:

(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::stopProfiling):
(JSC::ProfileNode::endAndRecordCall):
(JSC::ProfileNode::debugPrintData):
(JSC::ProfileNode::debugPrintDataSampleStyle):

  • profiler/ProfileNode.h:

(JSC::ProfileNode::totalTime):
(JSC::ProfileNode::setTotalTime):
(JSC::ProfileNode::selfTime):
(JSC::ProfileNode::setSelfTime):
(JSC::ProfileNode::totalPercent):
(JSC::ProfileNode::selfPercent):
Remove support for things like focus and exclude. The Inspector does those in JS now.

Source/WebCore:

Passes existing tests in fast/profiler.

  • bindings/js/ScriptProfile.cpp:

(WebCore::buildInspectorObjectFor): Remove visible.

  • inspector/ScriptProfileNode.idl: Ditto.
  • inspector/protocol/Profiler.json: Ditto.

Source/WebInspectorUI:

  • Versions/Inspector-iOS-7.0.json: Remove visible from CPUProfileNode.

LayoutTests:

  • fast/profiler/resources/profiler-test-JS-resources.js:

(printProfileNodeWithoutTime): Don't use visible. It was always true.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/profiler/Profile.cpp

    r159937 r162796  
    6666}
    6767
    68 void Profile::focus(const ProfileNode* profileNode)
    69 {
    70     if (!profileNode || !m_head)
    71         return;
    72 
    73     bool processChildren;
    74     const CallIdentifier& callIdentifier = profileNode->callIdentifier();
    75     for (ProfileNode* currentNode = m_head.get(); currentNode; currentNode = currentNode->traverseNextNodePreOrder(processChildren))
    76         processChildren = currentNode->focus(callIdentifier);
    77 
    78     // Set the visible time of all nodes so that the %s display correctly.
    79     forEach(&ProfileNode::calculateVisibleTotalTime);
    80 }
    81 
    82 void Profile::exclude(const ProfileNode* profileNode)
    83 {
    84     if (!profileNode || !m_head)
    85         return;
    86 
    87     const CallIdentifier& callIdentifier = profileNode->callIdentifier();
    88 
    89     for (ProfileNode* currentNode = m_head.get(); currentNode; currentNode = currentNode->traverseNextNodePreOrder())
    90         currentNode->exclude(callIdentifier);
    91 
    92     // Set the visible time of the head so the %s display correctly.
    93     m_head->setVisibleTotalTime(m_head->totalTime() - m_head->selfTime());
    94     m_head->setVisibleSelfTime(0.0);
    95 }
    96 
    97 void Profile::restoreAll()
    98 {
    99     forEach(&ProfileNode::restore);
    100 }
    101 
    10268#ifndef NDEBUG
    10369void Profile::debugPrintData() const
Note: See TracChangeset for help on using the changeset viewer.