Ignore:
Timestamp:
May 16, 2008, 3:23:09 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-05-16 Kevin McCullough <[email protected]>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)
Implement sorting for the profiler.
I chose to sort the profileNodes in place since there is no reason they
need to retain their original order.

  • JavaScriptCore.exp: Export the symbols.
  • profiler/Profile.h: Add the different ways a profile can be sorted. (KJS::Profile::sortTotalTimeDescending): (KJS::Profile::sortTotalTimeAscending): (KJS::Profile::sortSelfTimeDescending): (KJS::Profile::sortSelfTimeAscending): (KJS::Profile::sortCallsDescending): (KJS::Profile::sortCallsAscending):
  • profiler/ProfileNode.cpp: Implement those ways. (KJS::totalTimeDescendingComparator): (KJS::ProfileNode::sortTotalTimeDescending): (KJS::totalTimeAscendingComparator): (KJS::ProfileNode::sortTotalTimeAscending): (KJS::selfTimeDescendingComparator): (KJS::ProfileNode::sortSelfTimeDescending): (KJS::selfTimeAscendingComparator): (KJS::ProfileNode::sortSelfTimeAscending): (KJS::callsDescendingComparator): (KJS::ProfileNode::sortCallsDescending): (KJS::callsAscendingComparator): (KJS::ProfileNode::sortCallsAscending):
  • profiler/ProfileNode.h: No longer use a Deque since it cannot be sorted by std::sort and there was no reason not to use a Vector. I previously had though I would do prepending but am not. (KJS::ProfileNode::selfTime): (KJS::ProfileNode::totalPercent): (KJS::ProfileNode::selfPercent): (KJS::ProfileNode::children):
  • profiler/Profiler.cpp: Removed these functions as they can be called directoy on the Profile object after getting the Vector of them. (KJS::getStackNames):
  • profiler/Profiler.h:

WebCore:

2008-05-16 Kevin McCullough <[email protected]>

Reviewed by Tim.

<rdar://problem/5770054> JavaScript profiler (10928)
Use a Vector instead of a Deque since we don't use the extra capabilities
of the Deque.

  • page/JavaScriptProfileNode.cpp: (WebCore::getChildren): (WebCore::toJS):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/profiler/Profiler.cpp

    r33507 r33532  
    121121{
    122122    for (ExecState* currentState = exec; currentState; currentState = currentState->callingExecState()) {
    123 
    124123        if (FunctionImp* functionImp = currentState->function())
    125124            names.prepend(getFunctionName(functionImp));
     
    154153}
    155154
    156 void Profiler::printDataInspectorStyle(unsigned whichProfile) const
    157 {
    158     m_allProfiles[whichProfile]->printDataInspectorStyle();
    159 }
    160 
    161 void Profiler::printDataSampleStyle(unsigned whichProfile) const
    162 {
    163     m_allProfiles[whichProfile]->printDataSampleStyle();
    164 }
    165 
    166155void Profiler::debugLog(UString message)
    167156{
Note: See TracChangeset for help on using the changeset viewer.