Changeset 34051 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
May 22, 2008, 10:15:28 PM (17 years ago)
Author:
[email protected]
Message:

Adds Focus, Exclude and Restore buttons to the Profile view
Status bar. Also adds a Record button to create new profiles.

<rdar://problem/5950867> JSProfiler: Allow the profiler to "Focus" a profile node.
<rdar://problem/5951529> JSProfiler: Allow the profiler to "Exclude" a profile node.

Reviewed by Adam Roben.

  • English.lproj/localizedStrings.js: Added new strings.
  • page/JavaScriptProfile.cpp:

(WebCore::restoreAll): Call Profile::restoreAll.
(WebCore::ProfileClass): Added restoreAll to the static functions.

  • page/inspector/Images/excludeButtons.png: Added.
  • page/inspector/Images/focusButtons.png: Added.
  • page/inspector/Images/recordButtons.png: Added.
  • page/inspector/Images/reloadButtons.png: Added.
  • page/inspector/ProfileView.js:

(WebInspector.ProfileView): Create the buttons elements.
(WebInspector.ProfileView.prototype.get statusBarItems): Return the three
status bar buttons.
(WebInspector.ProfileView.prototype.refresh): Only create ProfileDataGridNodes
for ProfileNodes that are visible.
(WebInspector.ProfileView.prototype.refreshShowAsPercents): Just call
refresh on the children, now that they have access to the ProfileView's properties.
(WebInspector.ProfileView.prototype._focusClicked): Call focus
on the profile, refresh the ProfileView and show the reset button.
(WebInspector.ProfileView.prototype._excludeClicked): Call exclude
on the profile, refresh the ProfileView and show the reset button.
(WebInspector.ProfileView.prototype._resetClicked): Call restoreAll
on the profile, refresh the ProfileView and hide the reset button.
(WebInspector.ProfileView.prototype._dataGridNodeSelected): Enable the
focus and exclude buttons.
(WebInspector.ProfileView.prototype._dataGridNodeDeselected): Disable the
focus and exclude buttons.
(WebInspector.ProfileDataGridNode): Take a ProfileView, and remove the
showPercentAs* arguments.

  • page/inspector/ProfilesPanel.js: Add a record status bar button and

th ability to have per-view status bar buttons.

  • page/inspector/inspector.css: New styles.
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r34049 r34051  
     12008-05-22  Timothy Hatcher  <[email protected]>
     2
     3        Added Profile::restoreAll and added ProfileNode::restoreAll
     4        to the export file.
     5
     6        Reviewed by Adam Roben.
     7
     8        * JavaScriptCore.exp:
     9        * profiler/Profile.h:
     10
    1112008-05-22  Alp Toker  <[email protected]>
    212
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r34043 r34051  
    9292__ZN3KJS11JSImmediate8toStringEPKNS_7JSValueE
    9393__ZN3KJS11ProfileNode5focusERKNS_14CallIdentifierEb
     94__ZN3KJS11ProfileNode10restoreAllEv
    9495__ZN3KJS11ProfileNode7excludeERKNS_14CallIdentifierE
    9596__ZN3KJS11ProfileNode18sortCallsAscendingEv
  • trunk/JavaScriptCore/profiler/Profile.h

    r34043 r34051  
    6262        void focus(const ProfileNode* profileNode) { if (!profileNode) return; m_headNode->focus(profileNode->callIdentifier()); }
    6363        void exclude(const ProfileNode* profileNode) { if (!profileNode) return; m_headNode->exclude(profileNode->callIdentifier()); }
     64        void restoreAll() { m_headNode->restoreAll(); }
    6465
    6566#ifndef NDEBUG
Note: See TracChangeset for help on using the changeset viewer.