Ignore:
Timestamp:
Jul 9, 2008, 4:07:52 PM (17 years ago)
Author:
[email protected]
Message:

2008-07-09 Kevin McCullough <[email protected]>

Reviewed by Geoff and Adam.

<rdar://problem/5951532> JSProfiler: Implement Bottom-Up view (19228)

  • This is the plumbing for bottom-up, but does not include calculating time, mostly because I'm still undclear about what the end result should look like.
  • This, obviously, does not include the UI to expose this in the inspector yet.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • profiler/CallIdentifier.h: (KJS::CallIdentifier::CallIdentifier): (WTF::): Added HashTraits for CallIdentifiers to be used by a HashMap.
  • profiler/HeavyProfile.cpp: Added. (KJS::HeavyProfile::HeavyProfile): (KJS::HeavyProfile::generateHeavyStructure): (KJS::HeavyProfile::addNode): (KJS::HeavyProfile::mergeProfiles): (KJS::HeavyProfile::addAncestorsAsChildren):
  • profiler/HeavyProfile.h: Added. (KJS::HeavyProfile::create): (KJS::HeavyProfile::heavyProfile): (KJS::HeavyProfile::treeProfile):
  • profiler/Profile.cpp: Removed old commented out includes.
  • profiler/Profile.h: The m_head is needed by the HeavyProfile so it is now protected as opposed to private.
  • profiler/ProfileNode.cpp: (KJS::ProfileNode::ProfileNode): Created a constructor to copy ProfileNodes. (KJS::ProfileNode::findChild): Added a null check to make HeavyProfile children finding easier and avoid a potential crasher.
  • profiler/ProfileNode.h: Mostly moved things around but also added some functionality needed by HeavyProfile. (KJS::ProfileNode::create): (KJS::ProfileNode::functionName): (KJS::ProfileNode::url): (KJS::ProfileNode::lineNumber): (KJS::ProfileNode::head): (KJS::ProfileNode::setHead): (KJS::ProfileNode::setNextSibling): (KJS::ProfileNode::actualTotalTime): (KJS::ProfileNode::actualSelfTime):
  • profiler/TreeProfile.cpp: Implemented the ability to get a HeavyProfile. (KJS::TreeProfile::heavyProfile):
  • profiler/TreeProfile.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r35039 r35077  
    9595                95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 95CD45750E1C4FDD0085358E /* ProfileGenerator.h */; settings = {ATTRIBUTES = (); }; };
    9696                95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 95E3BC040E1AE68200B2D1C1 /* CallIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
     97                95FDFA140E22998F0006FB00 /* HeavyProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95FDFA130E22998F0006FB00 /* HeavyProfile.cpp */; };
     98                95FDFA160E2299980006FB00 /* HeavyProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 95FDFA150E2299980006FB00 /* HeavyProfile.h */; };
    9799                A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72700780DAC605600E548D7 /* JSNotAnObject.cpp */; };
    98100                A72701B60DADE94900E548D7 /* ExceptionHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72701B40DADE94900E548D7 /* ExceptionHelpers.cpp */; };
     
    598600                95CD45750E1C4FDD0085358E /* ProfileGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfileGenerator.h; path = profiler/ProfileGenerator.h; sourceTree = "<group>"; };
    599601                95E3BC040E1AE68200B2D1C1 /* CallIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallIdentifier.h; path = profiler/CallIdentifier.h; sourceTree = "<group>"; };
     602                95FDFA130E22998F0006FB00 /* HeavyProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HeavyProfile.cpp; path = profiler/HeavyProfile.cpp; sourceTree = "<group>"; };
     603                95FDFA150E2299980006FB00 /* HeavyProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HeavyProfile.h; path = profiler/HeavyProfile.h; sourceTree = "<group>"; };
    600604                A72700770DAC605600E548D7 /* JSNotAnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNotAnObject.h; sourceTree = "<group>"; };
    601605                A72700780DAC605600E548D7 /* JSNotAnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotAnObject.cpp; sourceTree = "<group>"; };
     
    12611265                        children = (
    12621266                                95E3BC040E1AE68200B2D1C1 /* CallIdentifier.h */,
     1267                                95FDFA130E22998F0006FB00 /* HeavyProfile.cpp */,
     1268                                95FDFA150E2299980006FB00 /* HeavyProfile.h */,
    12631269                                95742F630DD11F5A000917FB /* Profile.cpp */,
    12641270                                95742F640DD11F5A000917FB /* Profile.h */,
     
    14931499                                BC756FC90E2031B200DE7D12 /* JSGlobalObjectFunctions.h in Headers */,
    14941500                                BCF605140E203EF800B9A64D /* ArgList.h in Headers */,
     1501                                95FDFA160E2299980006FB00 /* HeavyProfile.h in Headers */,
    14951502                        );
    14961503                        runOnlyForDeploymentPostprocessing = 0;
     
    17941801                                95CD41B30E1BF6560085358E /* TreeProfile.cpp in Sources */,
    17951802                                95CD45760E1C4FDD0085358E /* ProfileGenerator.cpp in Sources */,
     1803                                95FDFA140E22998F0006FB00 /* HeavyProfile.cpp in Sources */,
    17961804                        );
    17971805                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.